diff options
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 1b4ebe81191c..8fdbd38e02c4 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -618,8 +618,6 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
618 | *pos++ = len; | 618 | *pos++ = len; |
619 | for (i = 0; i < len; i++) { | 619 | for (i = 0; i < len; i++) { |
620 | int rate = mode->rates[i].rate; | 620 | int rate = mode->rates[i].rate; |
621 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
622 | rate /= 2; | ||
623 | *pos++ = (u8) (rate / 5); | 621 | *pos++ = (u8) (rate / 5); |
624 | } | 622 | } |
625 | 623 | ||
@@ -629,8 +627,6 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
629 | *pos++ = mode->num_rates - len; | 627 | *pos++ = mode->num_rates - len; |
630 | for (i = len; i < mode->num_rates; i++) { | 628 | for (i = len; i < mode->num_rates; i++) { |
631 | int rate = mode->rates[i].rate; | 629 | int rate = mode->rates[i].rate; |
632 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
633 | rate /= 2; | ||
634 | *pos++ = (u8) (rate / 5); | 630 | *pos++ = (u8) (rate / 5); |
635 | } | 631 | } |
636 | } | 632 | } |
@@ -889,10 +885,7 @@ static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst, | |||
889 | pos = skb_put(skb, 1); | 885 | pos = skb_put(skb, 1); |
890 | supp_rates[1]++; | 886 | supp_rates[1]++; |
891 | } | 887 | } |
892 | if (mode->mode == MODE_ATHEROS_TURBO) | 888 | *pos = rate->rate / 5; |
893 | *pos = rate->rate / 10; | ||
894 | else | ||
895 | *pos = rate->rate / 5; | ||
896 | } | 889 | } |
897 | 890 | ||
898 | ieee80211_sta_tx(dev, skb, 0); | 891 | ieee80211_sta_tx(dev, skb, 0); |
@@ -1285,16 +1278,12 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, | |||
1285 | mode = local->oper_hw_mode; | 1278 | mode = local->oper_hw_mode; |
1286 | for (i = 0; i < elems.supp_rates_len; i++) { | 1279 | for (i = 0; i < elems.supp_rates_len; i++) { |
1287 | int rate = (elems.supp_rates[i] & 0x7f) * 5; | 1280 | int rate = (elems.supp_rates[i] & 0x7f) * 5; |
1288 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
1289 | rate *= 2; | ||
1290 | for (j = 0; j < mode->num_rates; j++) | 1281 | for (j = 0; j < mode->num_rates; j++) |
1291 | if (mode->rates[j].rate == rate) | 1282 | if (mode->rates[j].rate == rate) |
1292 | rates |= BIT(j); | 1283 | rates |= BIT(j); |
1293 | } | 1284 | } |
1294 | for (i = 0; i < elems.ext_supp_rates_len; i++) { | 1285 | for (i = 0; i < elems.ext_supp_rates_len; i++) { |
1295 | int rate = (elems.ext_supp_rates[i] & 0x7f) * 5; | 1286 | int rate = (elems.ext_supp_rates[i] & 0x7f) * 5; |
1296 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
1297 | rate *= 2; | ||
1298 | for (j = 0; j < mode->num_rates; j++) | 1287 | for (j = 0; j < mode->num_rates; j++) |
1299 | if (mode->rates[j].rate == rate) | 1288 | if (mode->rates[j].rate == rate) |
1300 | rates |= BIT(j); | 1289 | rates |= BIT(j); |
@@ -1514,8 +1503,6 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
1514 | rate = elems.ext_supp_rates | 1503 | rate = elems.ext_supp_rates |
1515 | [i - elems.supp_rates_len]; | 1504 | [i - elems.supp_rates_len]; |
1516 | own_rate = 5 * (rate & 0x7f); | 1505 | own_rate = 5 * (rate & 0x7f); |
1517 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
1518 | own_rate *= 2; | ||
1519 | for (j = 0; j < num_rates; j++) | 1506 | for (j = 0; j < num_rates; j++) |
1520 | if (rates[j].rate == own_rate) | 1507 | if (rates[j].rate == own_rate) |
1521 | supp_rates |= BIT(j); | 1508 | supp_rates |= BIT(j); |
@@ -2344,8 +2331,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2344 | mode = local->oper_hw_mode; | 2331 | mode = local->oper_hw_mode; |
2345 | for (i = 0; i < bss->supp_rates_len; i++) { | 2332 | for (i = 0; i < bss->supp_rates_len; i++) { |
2346 | int bitrate = (bss->supp_rates[i] & 0x7f) * 5; | 2333 | int bitrate = (bss->supp_rates[i] & 0x7f) * 5; |
2347 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
2348 | bitrate *= 2; | ||
2349 | for (j = 0; j < mode->num_rates; j++) | 2334 | for (j = 0; j < mode->num_rates; j++) |
2350 | if (mode->rates[j].rate == bitrate) | 2335 | if (mode->rates[j].rate == bitrate) |
2351 | rates |= BIT(j); | 2336 | rates |= BIT(j); |
@@ -2418,8 +2403,6 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
2418 | pos = bss->supp_rates; | 2403 | pos = bss->supp_rates; |
2419 | for (i = 0; i < mode->num_rates; i++) { | 2404 | for (i = 0; i < mode->num_rates; i++) { |
2420 | int rate = mode->rates[i].rate; | 2405 | int rate = mode->rates[i].rate; |
2421 | if (mode->mode == MODE_ATHEROS_TURBO) | ||
2422 | rate /= 2; | ||
2423 | *pos++ = (u8) (rate / 5); | 2406 | *pos++ = (u8) (rate / 5); |
2424 | } | 2407 | } |
2425 | 2408 | ||