Index: head/sys/dev/usb/wlan/if_urtwn.c =================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c +++ head/sys/dev/usb/wlan/if_urtwn.c @@ -1601,14 +1601,16 @@ SM(R92C_TXDW1_QSEL, R92C_TXDW1_QSEL_BEACON) | SM(R92C_TXDW1_RAID, R92C_RAID_11B)); - if (sc->chip & URTWN_CHIP_88E) + if (sc->chip & URTWN_CHIP_88E) { txd->txdw1 |= htole32(SM(R88E_TXDW1_MACID, URTWN_MACID_BC)); - else + txd->txdseq |= htole16(R88E_TXDSEQ_HWSEQ_EN); + } else { txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, URTWN_MACID_BC)); + txd->txdw4 |= htole32(R92C_TXDW4_HWSEQ_EN); + } txd->txdw4 = htole32(R92C_TXDW4_DRVRATE); txd->txdw5 = htole32(SM(R92C_TXDW5_DATARATE, URTWN_RIDX_CCK1)); - txd->txdseq = htole16(R92C_TXDSEQ_HWSEQ_EN); } static int @@ -2249,13 +2251,17 @@ txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, macid)); txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, ridx)); - /* not sure here */ - if (ridx <= URTWN_RIDX_CCK11) + /* Force this rate if needed. */ + if (ismcast || type != IEEE80211_FC0_TYPE_DATA || + (m->m_flags & M_EAPOL)) txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE); if (!IEEE80211_QOS_HAS_SEQ(wh)) { /* Use HW sequence numbering for non-QoS frames. */ - txd->txdseq = htole16(R92C_TXDSEQ_HWSEQ_EN); + if (sc->chip & URTWN_CHIP_88E) + txd->txdseq = htole16(R88E_TXDSEQ_HWSEQ_EN); + else + txd->txdw4 |= htole32(R92C_TXDW4_HWSEQ_EN); } else { /* Set sequence number. */ txd->txdseq = htole16(M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE); Index: head/sys/dev/usb/wlan/if_urtwnreg.h =================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h +++ head/sys/dev/usb/wlan/if_urtwnreg.h @@ -1055,12 +1055,13 @@ uint16_t txdw3; uint16_t txdseq; -#define R92C_TXDSEQ_HWSEQ_EN 0x8000 +#define R88E_TXDSEQ_HWSEQ_EN 0x8000 uint32_t txdw4; #define R92C_TXDW4_RTSRATE_M 0x0000003f #define R92C_TXDW4_RTSRATE_S 0 #define R92C_TXDW4_HWSEQ_QOS 0x00000040 +#define R92C_TXDW4_HWSEQ_EN 0x00000080 #define R92C_TXDW4_DRVRATE 0x00000100 #define R92C_TXDW4_CTS2SELF 0x00000800 #define R92C_TXDW4_RTSEN 0x00001000