2013-09-05 01:39:51

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: [PATCH] mac80211: fix the setting of extended supported rate IE

The patch "mac80211: select and adjust bitrates according to
channel mode" causes regression and breaks the extended supported rate
IE setting. Fix this.

Signed-off-by: Chun-Yeow Yeoh <[email protected]>
Signed-off-by: Colleen Twitty <[email protected]>
---
net/mac80211/util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3c8283b..21fef9f 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2134,13 +2134,13 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
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,
5 * (1 << shift));
*pos++ = basic | (u8) rate;
+ if (skip++ < 8)
+ continue;
}
}
return 0;
--
1.7.9.5