diff options
Diffstat (limited to 'net/mac80211/rate.c')
-rw-r--r-- | net/mac80211/rate.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index e126605cec66..22b223f13c9f 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -235,7 +235,8 @@ static void rc_send_low_basicrate(s8 *idx, u32 basic_rates, | |||
235 | static void __rate_control_send_low(struct ieee80211_hw *hw, | 235 | static void __rate_control_send_low(struct ieee80211_hw *hw, |
236 | struct ieee80211_supported_band *sband, | 236 | struct ieee80211_supported_band *sband, |
237 | struct ieee80211_sta *sta, | 237 | struct ieee80211_sta *sta, |
238 | struct ieee80211_tx_info *info) | 238 | struct ieee80211_tx_info *info, |
239 | u32 rate_mask) | ||
239 | { | 240 | { |
240 | int i; | 241 | int i; |
241 | u32 rate_flags = | 242 | u32 rate_flags = |
@@ -247,6 +248,12 @@ static void __rate_control_send_low(struct ieee80211_hw *hw, | |||
247 | 248 | ||
248 | info->control.rates[0].idx = 0; | 249 | info->control.rates[0].idx = 0; |
249 | for (i = 0; i < sband->n_bitrates; i++) { | 250 | for (i = 0; i < sband->n_bitrates; i++) { |
251 | if (!(rate_mask & BIT(i))) | ||
252 | continue; | ||
253 | |||
254 | if ((rate_flags & sband->bitrates[i].flags) != rate_flags) | ||
255 | continue; | ||
256 | |||
250 | if (!rate_supported(sta, sband->band, i)) | 257 | if (!rate_supported(sta, sband->band, i)) |
251 | continue; | 258 | continue; |
252 | 259 | ||
@@ -274,7 +281,8 @@ bool rate_control_send_low(struct ieee80211_sta *pubsta, | |||
274 | bool use_basicrate = false; | 281 | bool use_basicrate = false; |
275 | 282 | ||
276 | if (!pubsta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) { | 283 | if (!pubsta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) { |
277 | __rate_control_send_low(txrc->hw, sband, pubsta, info); | 284 | __rate_control_send_low(txrc->hw, sband, pubsta, info, |
285 | txrc->rate_idx_mask); | ||
278 | 286 | ||
279 | if (!pubsta && txrc->bss) { | 287 | if (!pubsta && txrc->bss) { |
280 | mcast_rate = txrc->bss_conf->mcast_rate[sband->band]; | 288 | mcast_rate = txrc->bss_conf->mcast_rate[sband->band]; |
@@ -656,7 +664,8 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif, | |||
656 | rate_control_apply_mask(sdata, sta, sband, info, dest, max_rates); | 664 | rate_control_apply_mask(sdata, sta, sband, info, dest, max_rates); |
657 | 665 | ||
658 | if (dest[0].idx < 0) | 666 | if (dest[0].idx < 0) |
659 | __rate_control_send_low(&sdata->local->hw, sband, sta, info); | 667 | __rate_control_send_low(&sdata->local->hw, sband, sta, info, |
668 | sdata->rc_rateidx_mask[info->band]); | ||
660 | 669 | ||
661 | if (sta) | 670 | if (sta) |
662 | rate_fixup_ratelist(vif, sband, info, dest, max_rates); | 671 | rate_fixup_ratelist(vif, sband, info, dest, max_rates); |