aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-10-30 11:08:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:17:40 -0500
commitd61272cbb35fa1c08fe94898583d880256f2dbd3 (patch)
tree94371a1dd2f592f19286be3a4b5f262227b177b6 /net/mac80211/mlme.c
parentab1ef980504ca7f17b675b3a53a88956f800fce3 (diff)
mac80211: fix basic rates setting from association response
In previous code all the rates were marked as basic. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 708eb4502ed7..dee6448c4eb0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1291,29 +1291,35 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1291 1291
1292 for (i = 0; i < elems.supp_rates_len; i++) { 1292 for (i = 0; i < elems.supp_rates_len; i++) {
1293 int rate = (elems.supp_rates[i] & 0x7f) * 5; 1293 int rate = (elems.supp_rates[i] & 0x7f) * 5;
1294 bool is_basic = !!(elems.supp_rates[i] & 0x80);
1294 1295
1295 if (rate > 110) 1296 if (rate > 110)
1296 have_higher_than_11mbit = true; 1297 have_higher_than_11mbit = true;
1297 1298
1298 for (j = 0; j < sband->n_bitrates; j++) { 1299 for (j = 0; j < sband->n_bitrates; j++) {
1299 if (sband->bitrates[j].bitrate == rate) 1300 if (sband->bitrates[j].bitrate == rate) {
1300 rates |= BIT(j); 1301 rates |= BIT(j);
1301 if (elems.supp_rates[i] & 0x80) 1302 if (is_basic)
1302 basic_rates |= BIT(j); 1303 basic_rates |= BIT(j);
1304 break;
1305 }
1303 } 1306 }
1304 } 1307 }
1305 1308
1306 for (i = 0; i < elems.ext_supp_rates_len; i++) { 1309 for (i = 0; i < elems.ext_supp_rates_len; i++) {
1307 int rate = (elems.ext_supp_rates[i] & 0x7f) * 5; 1310 int rate = (elems.ext_supp_rates[i] & 0x7f) * 5;
1311 bool is_basic = !!(elems.supp_rates[i] & 0x80);
1308 1312
1309 if (rate > 110) 1313 if (rate > 110)
1310 have_higher_than_11mbit = true; 1314 have_higher_than_11mbit = true;
1311 1315
1312 for (j = 0; j < sband->n_bitrates; j++) { 1316 for (j = 0; j < sband->n_bitrates; j++) {
1313 if (sband->bitrates[j].bitrate == rate) 1317 if (sband->bitrates[j].bitrate == rate) {
1314 rates |= BIT(j); 1318 rates |= BIT(j);
1315 if (elems.ext_supp_rates[i] & 0x80) 1319 if (is_basic)
1316 basic_rates |= BIT(j); 1320 basic_rates |= BIT(j);
1321 break;
1322 }
1317 } 1323 }
1318 } 1324 }
1319 1325