public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Jouni Malinen <jouni.malinen@atheros•com>,
	"John W. Linville" <linville@tuxdriver•com>
Subject: linux-next: manual merge of the net tree with the wireless-current tree
Date: Mon, 15 Feb 2010 15:20:23 +1100	[thread overview]
Message-ID: <20100215152023.0696878f.sfr@canb.auug.org.au> (raw)

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                    sfr@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);

             reply	other threads:[~2010-02-15  4:20 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15  4:20 Stephen Rothwell [this message]
2010-02-15  6:22 ` linux-next: manual merge of the net tree with the wireless-current tree David Miller
2010-02-15  7:16   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2011-09-27  2:51 Stephen Rothwell
2011-09-27 13:09 ` John W. Linville
2011-09-27 14:41   ` wwguy
2011-07-06  2:53 Stephen Rothwell
2011-07-06 11:07 ` Gustavo Padovan
2011-06-28  4:02 Stephen Rothwell
2011-06-28 14:57 ` Guy, Wey-Yi
2010-12-02 23:45 Stephen Rothwell
2010-05-12  2:15 Stephen Rothwell
2010-05-12 16:15 ` reinette chatre
2010-05-13  1:02   ` Stephen Rothwell
2010-03-30  2:37 Stephen Rothwell
2010-03-30 13:12 ` John W. Linville
2010-03-30 13:51   ` Stephen Rothwell
2010-02-09  2:24 Stephen Rothwell
2010-02-09  3:20 ` John W. Linville
2010-01-07  2:12 Stephen Rothwell
2010-01-06  2:25 Stephen Rothwell
2009-12-28 22:54 Stephen Rothwell
2009-12-28 23:41 ` John W. Linville
2009-12-01  1:31 Stephen Rothwell
2009-12-01 14:06 ` John W. Linville
2009-11-26  3:10 Stephen Rothwell
2009-11-26  9:33 ` Johannes Berg
2009-11-26 13:01   ` John W. Linville
2009-11-30 16:48     ` Jean Tourrilhes
2009-07-28  1:59 Stephen Rothwell
2009-07-28  1:53 Stephen Rothwell
2009-07-22  2:00 Stephen Rothwell
2009-07-22 14:03 ` John W. Linville
2009-07-22  1:59 Stephen Rothwell
2009-07-22  2:05 ` Zhu Yi
2009-07-22  4:50   ` Stephen Rothwell
2009-07-22  3:04 ` David Miller
2009-04-30  1:33 Stephen Rothwell
2009-04-30  2:16 ` John W. Linville
2009-04-30  3:23   ` David Miller
2009-04-29  3:51 Stephen Rothwell
2009-04-29 12:42 ` John W. Linville
2009-04-29 13:24   ` Stephen Rothwell
2009-03-24  2:37 Stephen Rothwell
2009-03-06  3:55 Stephen Rothwell
2009-02-19  5:23 Stephen Rothwell
2009-02-19  5:23 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100215152023.0696878f.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=davem@davemloft$(echo .)net \
    --cc=jouni.malinen@atheros$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linville@tuxdriver$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox