diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 1c36c9b4fa4a..eda290fb8bd2 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
@@ -209,9 +209,9 @@ minstrel_get_retry_count(struct minstrel_rate *mr, | |||
209 | { | 209 | { |
210 | unsigned int retry = mr->adjusted_retry_count; | 210 | unsigned int retry = mr->adjusted_retry_count; |
211 | 211 | ||
212 | if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) | 212 | if (info->control.use_rts) |
213 | retry = max(2U, min(mr->retry_count_rtscts, retry)); | 213 | retry = max(2U, min(mr->retry_count_rtscts, retry)); |
214 | else if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) | 214 | else if (info->control.use_cts_prot) |
215 | retry = max(2U, min(mr->retry_count_cts, retry)); | 215 | retry = max(2U, min(mr->retry_count_cts, retry)); |
216 | return retry; | 216 | return retry; |
217 | } | 217 | } |
@@ -460,6 +460,8 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
460 | } while ((tx_time < mp->segment_size) && | 460 | } while ((tx_time < mp->segment_size) && |
461 | (++mr->retry_count < mp->max_retry)); | 461 | (++mr->retry_count < mp->max_retry)); |
462 | mr->adjusted_retry_count = mr->retry_count; | 462 | mr->adjusted_retry_count = mr->retry_count; |
463 | if (!(sband->bitrates[i].flags & IEEE80211_RATE_ERP_G)) | ||
464 | mr->retry_count_cts = mr->retry_count; | ||
463 | } | 465 | } |
464 | 466 | ||
465 | for (i = n; i < sband->n_bitrates; i++) { | 467 | for (i = n; i < sband->n_bitrates; i++) { |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 15c1b286e280..6ca857f8f424 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -656,6 +656,9 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
656 | txrc.rts = rts = true; | 656 | txrc.rts = rts = true; |
657 | } | 657 | } |
658 | 658 | ||
659 | info->control.use_rts = rts; | ||
660 | info->control.use_cts_prot = tx->sdata->vif.bss_conf.use_cts_prot; | ||
661 | |||
659 | /* | 662 | /* |
660 | * Use short preamble if the BSS can handle it, but not for | 663 | * Use short preamble if the BSS can handle it, but not for |
661 | * management frames unless we know the receiver can handle | 664 | * management frames unless we know the receiver can handle |
@@ -766,6 +769,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
766 | */ | 769 | */ |
767 | if (rc_rate->flags & IEEE80211_TX_RC_MCS) { | 770 | if (rc_rate->flags & IEEE80211_TX_RC_MCS) { |
768 | WARN_ON(rc_rate->idx > 76); | 771 | WARN_ON(rc_rate->idx > 76); |
772 | |||
773 | if (!(rc_rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) && | ||
774 | tx->sdata->vif.bss_conf.use_cts_prot) | ||
775 | rc_rate->flags |= | ||
776 | IEEE80211_TX_RC_USE_CTS_PROTECT; | ||
769 | continue; | 777 | continue; |
770 | } | 778 | } |
771 | 779 | ||