Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH v3] mac80211: fix the setting of extended supported rate IE
@ 2013-09-08  6:40 Chun-Yeow Yeoh
  2013-09-26 17:57 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Chun-Yeow Yeoh @ 2013-09-08  6:40 UTC (permalink / raw)
  To: linux-wireless
  Cc: johannes, linville, devel, distro11s, Chun-Yeow Yeoh,
	Colleen Twitty

The patch "mac80211: select and adjust bitrates according to
channel mode" causes regression and breaks the extended supported rate
IE setting. Since "i" is starting with 8, so this is not necessary
to introduce "skip" here.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: Colleen Twitty <colleen@cozybit.com>
Reviewed-by: Jason Abele <jason@cozybit.com>
---
v2: remove skip checking (Jason)
v3: remove skip variable (Thomas)

 net/mac80211/util.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3c8283b..aa6d6cc 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2100,7 +2100,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
 {
 	struct ieee80211_local *local = sdata->local;
 	struct ieee80211_supported_band *sband;
-	int rate, skip, shift;
+	int rate, shift;
 	u8 i, exrates, *pos;
 	u32 basic_rates = sdata->vif.bss_conf.basic_rates;
 	u32 rate_flags;
@@ -2128,14 +2128,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
 		pos = skb_put(skb, exrates + 2);
 		*pos++ = WLAN_EID_EXT_SUPP_RATES;
 		*pos++ = exrates;
-		skip = 0;
 		for (i = 8; i < sband->n_bitrates; i++) {
 			u8 basic = 0;
 			if ((rate_flags & sband->bitrates[i].flags)
 			    != rate_flags)
 				continue;
-			if (skip++ < 8)
-				continue;
 			if (need_basic && basic_rates & BIT(i))
 				basic = 0x80;
 			rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-26 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-08  6:40 [PATCH v3] mac80211: fix the setting of extended supported rate IE Chun-Yeow Yeoh
2013-09-26 17:57 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox