Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linux-next: manual merge of the net tree with the wireless-current tree

1 view
Skip to first unread message

Stephen Rothwell

unread,
Feb 14, 2010, 11:30:01 PM2/14/10
to
Hi all,

Today's linux-next merge of the net tree got a conflict in
net/mac80211/rate.c between commit
5affcd6ba2036b59a4dee3f0576ae3584e92e4f1 ("mac80211: fix handling of
null-rate control in rate_control_get_rate") from the wireless-current
tree and commit 37eb0b164cf9fa9f70c8500926f5cde7c652f48e
("cfg80211/mac80211: Use more generic bitrate mask for rate control")
from the net tree.

John, I know you mentioned this, so I assume it will go away soon.

I fixed it up (I think - see below).
--
Cheers,
Stephen Rothwell s...@canb.auug.org.au

diff --cc net/mac80211/rate.c
index 12a2bff,c74b7c8..0000000
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@@ -245,26 -303,31 +303,34 @@@ void rate_control_get_rate(struct ieee8
info->control.rates[i].count = 1;
}

+ if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
+ return;
+
- if (sta && sdata->force_unicast_rateidx > -1) {
- info->control.rates[0].idx = sdata->force_unicast_rateidx;
- } else {
- ref->ops->get_rate(ref->priv, ista, priv_sta, txrc);
- info->flags |= IEEE80211_TX_INTFL_RCALGO;
- }
+ ref->ops->get_rate(ref->priv, ista, priv_sta, txrc);

/*
- * try to enforce the maximum rate the user wanted
+ * Try to enforce the rateidx mask the user wanted. skip this if the
+ * default mask (allow all rates) is used to save some processing for
+ * the common case.
*/
- if (sdata->max_ratectrl_rateidx > -1)
+ mask = sdata->rc_rateidx_mask[info->band];
+ if (mask != (1 << txrc->sband->n_bitrates) - 1) {
+ if (sta) {
+ /* Filter out rates that the STA does not support */
+ mask &= sta->sta.supp_rates[info->band];
+ }
+ /*
+ * Make sure the rate index selected for each TX rate is
+ * included in the configured mask and change the rate indexes
+ * if needed.
+ */
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
+ /* Rate masking supports only legacy rates for now */
if (info->control.rates[i].flags & IEEE80211_TX_RC_MCS)
continue;
- info->control.rates[i].idx =
- min_t(s8, info->control.rates[i].idx,
- sdata->max_ratectrl_rateidx);
+ rate_idx_match_mask(&info->control.rates[i],
+ txrc->sband->n_bitrates, mask);
+ }
}

BUG_ON(info->control.rates[0].idx < 0);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

David Miller

unread,
Feb 15, 2010, 1:30:02 AM2/15/10
to
From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 15 Feb 2010 15:20:23 +1100

> Hi all,
>
> Today's linux-next merge of the net tree got a conflict in
> net/mac80211/rate.c between commit
> 5affcd6ba2036b59a4dee3f0576ae3584e92e4f1 ("mac80211: fix handling of
> null-rate control in rate_control_get_rate") from the wireless-current
> tree and commit 37eb0b164cf9fa9f70c8500926f5cde7c652f48e
> ("cfg80211/mac80211: Use more generic bitrate mask for rate control")
> from the net tree.
>
> John, I know you mentioned this, so I assume it will go away soon.
>
> I fixed it up (I think - see below).

Right, I'll even try to take care of this myself later tonight.

Stephen Rothwell

unread,
Feb 15, 2010, 2:20:02 AM2/15/10
to
Hi Dave,

On Sun, 14 Feb 2010 22:22:32 -0800 (PST) David Miller <da...@davemloft.net> wrote:
>
> Right, I'll even try to take care of this myself later tonight.

OK, thanks.

--
Cheers,
Stephen Rothwell s...@canb.auug.org.au

http://www.canb.auug.org.au/~sfr/

0 new messages