diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 22c9619ba776..15b8cf94f510 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -498,7 +498,7 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
498 | { | 498 | { |
499 | u32 rates; | 499 | u32 rates; |
500 | int i, j; | 500 | int i, j; |
501 | struct ieee80211_hw_mode *mode; | 501 | struct ieee80211_supported_band *sband; |
502 | 502 | ||
503 | if (params->station_flags & STATION_FLAG_CHANGED) { | 503 | if (params->station_flags & STATION_FLAG_CHANGED) { |
504 | sta->flags &= ~WLAN_STA_AUTHORIZED; | 504 | sta->flags &= ~WLAN_STA_AUTHORIZED; |
@@ -525,15 +525,16 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
525 | 525 | ||
526 | if (params->supported_rates) { | 526 | if (params->supported_rates) { |
527 | rates = 0; | 527 | rates = 0; |
528 | mode = local->oper_hw_mode; | 528 | sband = local->hw.wiphy->bands[local->oper_channel->band]; |
529 | |||
529 | for (i = 0; i < params->supported_rates_len; i++) { | 530 | for (i = 0; i < params->supported_rates_len; i++) { |
530 | int rate = (params->supported_rates[i] & 0x7f) * 5; | 531 | int rate = (params->supported_rates[i] & 0x7f) * 5; |
531 | for (j = 0; j < mode->num_rates; j++) { | 532 | for (j = 0; j < sband->n_bitrates; j++) { |
532 | if (mode->rates[j].rate == rate) | 533 | if (sband->bitrates[j].bitrate == rate) |
533 | rates |= BIT(j); | 534 | rates |= BIT(j); |
534 | } | 535 | } |
535 | } | 536 | } |
536 | sta->supp_rates = rates; | 537 | sta->supp_rates[local->oper_channel->band] = rates; |
537 | } | 538 | } |
538 | } | 539 | } |
539 | 540 | ||