Date: Wed, 6 Feb 2019 02:30:15 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343822 - stable/12/sys/dev/usb/wlan Message-ID: <201902060230.x162UFkA011300@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Wed Feb 6 02:30:14 2019 New Revision: 343822 URL: https://svnweb.freebsd.org/changeset/base/343822 Log: MFC r343577: rsu(4): add support for ifconfig(8) 'maxretry' option Modified: stable/12/sys/dev/usb/wlan/if_rsu.c stable/12/sys/dev/usb/wlan/if_rsureg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb 6 02:18:11 2019 (r343821) +++ stable/12/sys/dev/usb/wlan/if_rsu.c Wed Feb 6 02:30:14 2019 (r343822) @@ -2759,7 +2759,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no 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; @@ -2808,12 +2808,14 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no 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]; @@ -2871,6 +2873,12 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no txd->txdw2 |= htole32(R92S_TXDW2_BK); 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) { Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/12/sys/dev/usb/wlan/if_rsureg.h Wed Feb 6 02:18:11 2019 (r343821) +++ stable/12/sys/dev/usb/wlan/if_rsureg.h Wed Feb 6 02:30:14 2019 (r343822) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902060230.x162UFkA011300>