rtwn(4): clear 'basic' rate bit before calculating RTS/CTS rate.

Rate tables have this bit set to indicate minimal set of basic rates;
however, it overlappes with MCS bit, so rate2ridx() will treat them as
an 11n rate.

Due to the current rates setup the issue can be reproduced only
in 5GHz band with 11n / protection enabled.

Tested with RTL8821AU, HOSTAP mode.

MFC after:	5 days
This commit is contained in:
avos 2019-01-16 12:11:29 +00:00
parent eb82fa876e
commit 9260667a71
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ r92c_tx_protection(struct rtwn_softc *sc, struct r92c_tx_desc *txd,
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
else
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
ridx = rate2ridx(rate);
ridx = rate2ridx(IEEE80211_RV(rate));
txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, ridx));
/* RTS rate fallback limit (max). */

View File

@ -111,7 +111,7 @@ r12a_tx_protection(struct rtwn_softc *sc, struct r12a_tx_desc *txd,
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
else
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
ridx = rate2ridx(rate);
ridx = rate2ridx(IEEE80211_RV(rate));
txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx));
/* RTS rate fallback limit (max). */