summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_rsureg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/wlan/if_rsureg.h')
-rw-r--r--sys/dev/usb/wlan/if_rsureg.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/sys/dev/usb/wlan/if_rsureg.h b/sys/dev/usb/wlan/if_rsureg.h
index 8258dac..954950b 100644
--- a/sys/dev/usb/wlan/if_rsureg.h
+++ b/sys/dev/usb/wlan/if_rsureg.h
@@ -1,4 +1,3 @@
-
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
*
@@ -18,9 +17,6 @@
* $FreeBSD$
*/
-/* Maximum number of pipes is 11. */
-#define R92S_MAX_EP 11
-
/* USB Requests. */
#define R92S_REQ_REGS 0x05
@@ -519,7 +515,7 @@ struct r92s_rx_stat {
uint32_t rxdw4;
uint32_t rxdw5;
-} __packed __attribute__((aligned(4)));
+} __packed __aligned(4);
/* Rx PHY descriptor. */
struct r92s_rx_phystat {
@@ -531,7 +527,7 @@ struct r92s_rx_phystat {
uint32_t phydw5;
uint32_t phydw6;
uint32_t phydw7;
-} __packed __attribute__((aligned(4)));
+} __packed __aligned(4);
/* Rx PHY CCK descriptor. */
struct r92s_rx_cck {
@@ -595,18 +591,14 @@ struct r92s_tx_desc {
uint16_t txbufsize;
uint16_t reserved1;
-} __packed __attribute__((aligned(4)));
+} __packed __aligned(4);
/*
* Driver definitions.
*/
#define RSU_RX_LIST_COUNT 1
-#ifdef __OpenBSD__
-#define RSU_TX_LIST_COUNT (8 + 1) /* NB: +1 for FW commands. */
-#else
#define RSU_TX_LIST_COUNT 32
-#endif
#define RSU_HOST_CMD_RING_COUNT 32
@@ -735,6 +727,8 @@ struct rsu_vap {
#define RSU_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
#define RSU_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED)
+#define RSU_MAX_TX_EP 4
+
struct rsu_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
@@ -743,15 +737,11 @@ struct rsu_softc {
enum ieee80211_state, int);
struct usbd_interface *sc_iface;
struct timeout_task calib_task;
- struct callout sc_watchdog_ch;
- struct usbd_pipe *pipe[R92S_MAX_EP];
- int npipes;
const uint8_t *qid2idx;
struct mtx sc_mtx;
u_int cut;
int scan_pass;
- int sc_tx_timer;
struct rsu_host_cmd_ring cmdq;
struct rsu_data sc_rx[RSU_RX_LIST_COUNT];
struct rsu_data sc_tx[RSU_TX_LIST_COUNT];
@@ -764,9 +754,9 @@ struct rsu_softc {
STAILQ_HEAD(, rsu_data) sc_rx_active;
STAILQ_HEAD(, rsu_data) sc_rx_inactive;
- STAILQ_HEAD(, rsu_data) sc_tx_active;
+ STAILQ_HEAD(, rsu_data) sc_tx_active[RSU_MAX_TX_EP];
STAILQ_HEAD(, rsu_data) sc_tx_inactive;
- STAILQ_HEAD(, rsu_data) sc_tx_pending;
+ STAILQ_HEAD(, rsu_data) sc_tx_pending[RSU_MAX_TX_EP];
union {
struct rsu_rx_radiotap_header th;
OpenPOWER on IntegriCloud