rsu(4): add support for ifconfig(8) 'maxretry' option.
Tested with Asus USB-N10, STA mode; maxretry 0 / 1 / 6 / 12 Checked with RTL8188EE, MONITOR mode. MFC after: 1 week
This commit is contained in:
parent
602fa83239
commit
f20e36c166
@ -2755,7 +2755,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
|
||||
struct ieee80211_frame *wh;
|
||||
struct ieee80211_key *k = NULL;
|
||||
struct r92s_tx_desc *txd;
|
||||
uint8_t rate, ridx, type, cipher;
|
||||
uint8_t rate, ridx, type, cipher, qos;
|
||||
int prio = 0;
|
||||
uint8_t which;
|
||||
int hasqos;
|
||||
@ -2804,12 +2804,14 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
|
||||
prio = M_WME_GETAC(m0);
|
||||
which = rsu_wme_ac_xfer_map[prio];
|
||||
hasqos = 1;
|
||||
qos = ((const struct ieee80211_qosframe *)wh)->i_qos[0];
|
||||
} else {
|
||||
/* Non-QoS TID */
|
||||
/* XXX TODO: tid=0 for non-qos TID? */
|
||||
which = rsu_wme_ac_xfer_map[WME_AC_BE];
|
||||
hasqos = 0;
|
||||
prio = 0;
|
||||
qos = 0;
|
||||
}
|
||||
|
||||
qid = rsu_ac2qid[prio];
|
||||
@ -2868,6 +2870,12 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
|
||||
if (ismcast)
|
||||
txd->txdw2 |= htole32(R92S_TXDW2_BMCAST);
|
||||
|
||||
if (!ismcast && (!qos || (qos & IEEE80211_QOS_ACKPOLICY) !=
|
||||
IEEE80211_QOS_ACKPOLICY_NOACK)) {
|
||||
txd->txdw2 |= htole32(R92S_TXDW2_RTY_LMT_ENA);
|
||||
txd->txdw2 |= htole32(SM(R92S_TXDW2_RTY_LMT, tp->maxretry));
|
||||
}
|
||||
|
||||
/* Force mgmt / mcast / ucast rate if needed. */
|
||||
if (rate != 0) {
|
||||
/* Data rate fallback limit (max). */
|
||||
|
@ -688,6 +688,9 @@ struct r92s_tx_desc {
|
||||
#define R92S_TXDW1_HWPC 0x80000000
|
||||
|
||||
uint32_t txdw2;
|
||||
#define R92S_TXDW2_RTY_LMT_M 0x0000003f
|
||||
#define R92S_TXDW2_RTY_LMT_S 0
|
||||
#define R92S_TXDW2_RTY_LMT_ENA 0x00000040
|
||||
#define R92S_TXDW2_BMCAST 0x00000080
|
||||
#define R92S_TXDW2_AGGEN 0x20000000
|
||||
#define R92S_TXDW2_BK 0x40000000
|
||||
|
Loading…
Reference in New Issue
Block a user