{
unsigned int retry = mr->adjusted_retry_count;
- if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS)
+ if (info->control.use_rts)
retry = max(2U, min(mr->retry_count_rtscts, retry));
- else if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
+ else if (info->control.use_cts_prot)
retry = max(2U, min(mr->retry_count_cts, retry));
return retry;
}
} while ((tx_time < mp->segment_size) &&
(++mr->retry_count < mp->max_retry));
mr->adjusted_retry_count = mr->retry_count;
+ if (!(sband->bitrates[i].flags & IEEE80211_RATE_ERP_G))
+ mr->retry_count_cts = mr->retry_count;
}
for (i = n; i < sband->n_bitrates; i++) {
txrc.rts = rts = true;
}
+ info->control.use_rts = rts;
+ info->control.use_cts_prot = tx->sdata->vif.bss_conf.use_cts_prot;
+
/*
* Use short preamble if the BSS can handle it, but not for
* management frames unless we know the receiver can handle
*/
if (rc_rate->flags & IEEE80211_TX_RC_MCS) {
WARN_ON(rc_rate->idx > 76);
+
+ if (!(rc_rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) &&
+ tx->sdata->vif.bss_conf.use_cts_prot)
+ rc_rate->flags |=
+ IEEE80211_TX_RC_USE_CTS_PROTECT;
continue;
}