提交 d61272cb 编写于 作者: T Tomas Winkler 提交者: John W. Linville

mac80211: fix basic rates setting from association response

In previous code all the rates were marked as basic.
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ab1ef980
......@@ -1291,29 +1291,35 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
for (i = 0; i < elems.supp_rates_len; i++) {
int rate = (elems.supp_rates[i] & 0x7f) * 5;
bool is_basic = !!(elems.supp_rates[i] & 0x80);
if (rate > 110)
have_higher_than_11mbit = true;
for (j = 0; j < sband->n_bitrates; j++) {
if (sband->bitrates[j].bitrate == rate)
if (sband->bitrates[j].bitrate == rate) {
rates |= BIT(j);
if (elems.supp_rates[i] & 0x80)
basic_rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
break;
}
}
}
for (i = 0; i < elems.ext_supp_rates_len; i++) {
int rate = (elems.ext_supp_rates[i] & 0x7f) * 5;
bool is_basic = !!(elems.supp_rates[i] & 0x80);
if (rate > 110)
have_higher_than_11mbit = true;
for (j = 0; j < sband->n_bitrates; j++) {
if (sband->bitrates[j].bitrate == rate)
if (sband->bitrates[j].bitrate == rate) {
rates |= BIT(j);
if (elems.ext_supp_rates[i] & 0x80)
basic_rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
break;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册