aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/wlan
diff options
context:
space:
mode:
authorAndriy Voskoboinyk <avos@FreeBSD.org>2019-01-30 13:19:05 +0000
committerAndriy Voskoboinyk <avos@FreeBSD.org>2019-01-30 13:19:05 +0000
commitf20e36c166ca9710236ed693dd5974fb59771102 (patch)
tree6265ee97c7eaa6bc526c386c1a9495399ae7157a /sys/dev/usb/wlan
parent602fa8323919fbe89ce9a311b0d1b3a6c8d0cfad (diff)
Notes
Diffstat (limited to 'sys/dev/usb/wlan')
-rw-r--r--sys/dev/usb/wlan/if_rsu.c10
-rw-r--r--sys/dev/usb/wlan/if_rsureg.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c
index 6a294a0c7111..0d2e531657cc 100644
--- a/sys/dev/usb/wlan/if_rsu.c
+++ b/sys/dev/usb/wlan/if_rsu.c
@@ -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). */
diff --git a/sys/dev/usb/wlan/if_rsureg.h b/sys/dev/usb/wlan/if_rsureg.h
index b1cd36ea3f0f..a6ab170be7ce 100644
--- a/sys/dev/usb/wlan/if_rsureg.h
+++ b/sys/dev/usb/wlan/if_rsureg.h
@@ -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