svn commit: r293180 - head/sys/dev/usb/wlan
Andriy Voskoboinyk
avos at FreeBSD.org
Mon Jan 4 21:16:51 UTC 2016
Author: avos
Date: Mon Jan 4 21:16:49 2016
New Revision: 293180
URL: https://svnweb.freebsd.org/changeset/base/293180
Log:
urtwn: add bits for R92C_HWSEQ_CTRL and R92C_TXPAUSE registers
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4770
Modified:
head/sys/dev/usb/wlan/if_urtwn.c
head/sys/dev/usb/wlan/if_urtwnreg.h
Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c Mon Jan 4 21:11:27 2016 (r293179)
+++ head/sys/dev/usb/wlan/if_urtwn.c Mon Jan 4 21:16:49 2016 (r293180)
@@ -2277,7 +2277,7 @@ urtwn_newstate(struct ieee80211vap *vap,
case IEEE80211_S_SCAN:
/* Pause AC Tx queues. */
urtwn_write_1(sc, R92C_TXPAUSE,
- urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f);
+ urtwn_read_1(sc, R92C_TXPAUSE) | R92C_TX_QUEUE_AC);
break;
case IEEE80211_S_AUTH:
urtwn_set_chan(sc, ic->ic_curchan, NULL);
@@ -4425,7 +4425,7 @@ urtwn_lc_calib(struct urtwn_softc *sc)
}
} else {
/* Block all Tx queues. */
- urtwn_write_1(sc, R92C_TXPAUSE, 0xff);
+ urtwn_write_1(sc, R92C_TXPAUSE, R92C_TX_QUEUE_ALL);
}
/* Start calibration. */
urtwn_rf_write(sc, 0, R92C_RF_CHNLBW,
@@ -4640,7 +4640,7 @@ urtwn_init(struct urtwn_softc *sc)
ieee80211_runtask(ic, &sc->cmdq_task);
/* Enable hardware sequence numbering. */
- urtwn_write_1(sc, R92C_HWSEQ_CTRL, 0xff);
+ urtwn_write_1(sc, R92C_HWSEQ_CTRL, R92C_TX_QUEUE_ALL);
/* Enable per-packet TX report. */
if (sc->chip & URTWN_CHIP_88E) {
Modified: head/sys/dev/usb/wlan/if_urtwnreg.h
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jan 4 21:11:27 2016 (r293179)
+++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jan 4 21:16:49 2016 (r293180)
@@ -496,6 +496,24 @@
#define R92C_EDCA_PARAM_TXOP_M 0xffff0000
#define R92C_EDCA_PARAM_TXOP_S 16
+/* Bits for R92C_HWSEQ_CTRL / R92C_TXPAUSE. */
+#define R92C_TX_QUEUE_VO 0x01
+#define R92C_TX_QUEUE_VI 0x02
+#define R92C_TX_QUEUE_BE 0x04
+#define R92C_TX_QUEUE_BK 0x08
+#define R92C_TX_QUEUE_MGT 0x10
+#define R92C_TX_QUEUE_HIGH 0x20
+#define R92C_TX_QUEUE_BCN 0x40
+
+/* Shortcuts. */
+#define R92C_TX_QUEUE_AC \
+ (R92C_TX_QUEUE_VO | R92C_TX_QUEUE_VI | \
+ R92C_TX_QUEUE_BE | R92C_TX_QUEUE_BK)
+
+#define R92C_TX_QUEUE_ALL \
+ (R92C_TX_QUEUE_AC | R92C_TX_QUEUE_MGT | \
+ R92C_TX_QUEUE_HIGH | R92C_TX_QUEUE_BCN | 0x80) /* XXX */
+
/* Bits for R92C_BCN_CTRL. */
#define R92C_BCN_CTRL_EN_MBSSID 0x02
#define R92C_BCN_CTRL_TXBCN_RPT 0x04
More information about the svn-src-head
mailing list