rtwn: calculate control rate for VHT rate frames
If the passed in rate is a VHT rate, use rtwn_ctl_vhtrate() to find a suitable rate for RTS/CTS. Differential Revision: https://reviews.freebsd.org/D48295 Reviewed by: bz, cy, emaste
This commit is contained in:
@@ -103,11 +103,17 @@ r12a_tx_protection(struct rtwn_softc *sc, struct r12a_tx_desc *txd,
|
|||||||
|
|
||||||
if (mode == IEEE80211_PROT_CTSONLY ||
|
if (mode == IEEE80211_PROT_CTSONLY ||
|
||||||
mode == IEEE80211_PROT_RTSCTS) {
|
mode == IEEE80211_PROT_RTSCTS) {
|
||||||
/* TODO: VHT */
|
/*
|
||||||
if (RTWN_RATE_IS_HT(ridx))
|
* Note: this code assumes basic rates for protection for
|
||||||
|
* both 802.11abg and 802.11n rates.
|
||||||
|
*/
|
||||||
|
if (RTWN_RATE_IS_VHT(ridx))
|
||||||
|
rate = rtwn_ctl_vhtrate(ic->ic_rt, ridx);
|
||||||
|
else if (RTWN_RATE_IS_HT(ridx))
|
||||||
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
|
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
|
||||||
else
|
else
|
||||||
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
|
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
|
||||||
|
/* Map basic rate back to ridx */
|
||||||
ridx = rate2ridx(IEEE80211_RV(rate));
|
ridx = rate2ridx(IEEE80211_RV(rate));
|
||||||
|
|
||||||
txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx));
|
txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx));
|
||||||
|
|||||||
Reference in New Issue
Block a user