diff options
Diffstat (limited to 'net/mac80211/rate.c')
-rw-r--r-- | net/mac80211/rate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index dd88381c53b7..5d545dd2d050 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -460,9 +460,12 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
460 | * the common case. | 460 | * the common case. |
461 | */ | 461 | */ |
462 | mask = sdata->rc_rateidx_mask[info->band]; | 462 | mask = sdata->rc_rateidx_mask[info->band]; |
463 | memcpy(mcs_mask, sdata->rc_rateidx_mcs_mask[info->band], | 463 | if (mask != (1 << txrc->sband->n_bitrates) - 1 || txrc->rate_idx_mcs_mask) { |
464 | sizeof(mcs_mask)); | 464 | if (txrc->rate_idx_mcs_mask) |
465 | if (mask != (1 << txrc->sband->n_bitrates) - 1) { | 465 | memcpy(mcs_mask, txrc->rate_idx_mcs_mask, sizeof(mcs_mask)); |
466 | else | ||
467 | memset(mcs_mask, 0xff, sizeof(mcs_mask)); | ||
468 | |||
466 | if (sta) { | 469 | if (sta) { |
467 | /* Filter out rates that the STA does not support */ | 470 | /* Filter out rates that the STA does not support */ |
468 | mask &= sta->sta.supp_rates[info->band]; | 471 | mask &= sta->sta.supp_rates[info->band]; |