Commit cc63ec76 authored by Chun-Yeow Yeoh's avatar Chun-Yeow Yeoh Committed by Johannes Berg

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. Since "i" is starting with 8, so this is not necessary
to introduce "skip" here.
Signed-off-by: default avatarChun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: default avatarColleen Twitty <colleen@cozybit.com>
Reviewed-by: default avatarJason Abele <jason@cozybit.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 6329b8d9
...@@ -2103,7 +2103,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, ...@@ -2103,7 +2103,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
{ {
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int rate, skip, shift; int rate, shift;
u8 i, exrates, *pos; u8 i, exrates, *pos;
u32 basic_rates = sdata->vif.bss_conf.basic_rates; u32 basic_rates = sdata->vif.bss_conf.basic_rates;
u32 rate_flags; u32 rate_flags;
...@@ -2131,14 +2131,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, ...@@ -2131,14 +2131,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
pos = skb_put(skb, exrates + 2); pos = skb_put(skb, exrates + 2);
*pos++ = WLAN_EID_EXT_SUPP_RATES; *pos++ = WLAN_EID_EXT_SUPP_RATES;
*pos++ = exrates; *pos++ = exrates;
skip = 0;
for (i = 8; i < sband->n_bitrates; i++) { for (i = 8; i < sband->n_bitrates; i++) {
u8 basic = 0; u8 basic = 0;
if ((rate_flags & sband->bitrates[i].flags) if ((rate_flags & sband->bitrates[i].flags)
!= rate_flags) != rate_flags)
continue; continue;
if (skip++ < 8)
continue;
if (need_basic && basic_rates & BIT(i)) if (need_basic && basic_rates & BIT(i))
basic = 0x80; basic = 0x80;
rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment