diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 4961168f5091..d3a44812f8bf 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -519,7 +519,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
519 | txrc.bss_conf = &tx->sdata->vif.bss_conf; | 519 | txrc.bss_conf = &tx->sdata->vif.bss_conf; |
520 | txrc.skb = tx->skb; | 520 | txrc.skb = tx->skb; |
521 | txrc.reported_rate.idx = -1; | 521 | txrc.reported_rate.idx = -1; |
522 | txrc.max_rate_idx = tx->sdata->max_ratectrl_rateidx; | 522 | txrc.rate_idx_mask = tx->sdata->rc_rateidx_mask[tx->channel->band]; |
523 | if (txrc.rate_idx_mask == (1 << sband->n_bitrates) - 1) | ||
524 | txrc.max_rate_idx = -1; | ||
525 | else | ||
526 | txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; | ||
523 | txrc.ap = tx->sdata->vif.type == NL80211_IFTYPE_AP; | 527 | txrc.ap = tx->sdata->vif.type == NL80211_IFTYPE_AP; |
524 | 528 | ||
525 | /* set up RTS protection if desired */ | 529 | /* set up RTS protection if desired */ |
@@ -2178,7 +2182,11 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2178 | txrc.bss_conf = &sdata->vif.bss_conf; | 2182 | txrc.bss_conf = &sdata->vif.bss_conf; |
2179 | txrc.skb = skb; | 2183 | txrc.skb = skb; |
2180 | txrc.reported_rate.idx = -1; | 2184 | txrc.reported_rate.idx = -1; |
2181 | txrc.max_rate_idx = sdata->max_ratectrl_rateidx; | 2185 | txrc.rate_idx_mask = sdata->rc_rateidx_mask[band]; |
2186 | if (txrc.rate_idx_mask == (1 << sband->n_bitrates) - 1) | ||
2187 | txrc.max_rate_idx = -1; | ||
2188 | else | ||
2189 | txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; | ||
2182 | txrc.ap = true; | 2190 | txrc.ap = true; |
2183 | rate_control_get_rate(sdata, NULL, &txrc); | 2191 | rate_control_get_rate(sdata, NULL, &txrc); |
2184 | 2192 | ||