summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_runvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/wlan/if_runvar.h')
-rw-r--r--sys/dev/usb/wlan/if_runvar.h61
1 files changed, 47 insertions, 14 deletions
diff --git a/sys/dev/usb/wlan/if_runvar.h b/sys/dev/usb/wlan/if_runvar.h
index a7f8f1f..7349eaf 100644
--- a/sys/dev/usb/wlan/if_runvar.h
+++ b/sys/dev/usb/wlan/if_runvar.h
@@ -44,16 +44,18 @@
#define RUN_TX_RING_COUNT 32
#define RUN_RX_RING_COUNT 1
-#define RT2870_WCID_MAX 253
+#define RT2870_WCID_MAX 64
#define RUN_AID2WCID(aid) ((aid) & 0xff)
+#define RUN_VAP_MAX 8
+
struct run_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
uint8_t wr_flags;
uint8_t wr_rate;
uint16_t wr_chan_freq;
uint16_t wr_chan_flags;
- uint8_t wr_dbm_antsignal;
+ int8_t wr_dbm_antsignal;
uint8_t wr_antenna;
uint8_t wr_antsignal;
} __packed;
@@ -93,8 +95,7 @@ struct run_tx_data {
uint32_t align[0]; /* dummy field */
uint8_t desc[sizeof(struct rt2870_txd) +
sizeof(struct rt2860_txwi)];
- int ridx;
- uint8_t mcs;
+ uint8_t ridx;
};
STAILQ_HEAD(run_tx_data_head, run_tx_data);
@@ -102,19 +103,29 @@ struct run_node {
struct ieee80211_node ni;
uint8_t ridx[IEEE80211_RATE_MAXSIZE];
uint8_t ctl_ridx[IEEE80211_RATE_MAXSIZE];
+ uint8_t amrr_ridx;
+ uint8_t mgt_ridx;
+ uint8_t fix_ridx;
+};
+
+struct run_cmdq {
+ void *arg0;
+ void *arg1;
+ void (*func)(void *);
+ struct ieee80211_key *k;
+ struct ieee80211_key key;
+ uint8_t mac[IEEE80211_ADDR_LEN];
+ uint8_t wcid;
};
struct run_vap {
struct ieee80211vap vap;
struct ieee80211_beacon_offsets bo;
- struct usb_callout ratectl_ch;
- struct task ratectl_task;
- uint8_t ratectl_run;
-#define RUN_RATECTL_ON 1
-#define RUN_RATECTL_OFF 0
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
+
+ uint8_t rvp_id;
};
#define RUN_VAP(vap) ((struct run_vap *)(vap))
@@ -148,7 +159,7 @@ struct run_softc {
device_t sc_dev;
struct usb_device *sc_udev;
struct ifnet *sc_ifp;
- struct run_vap *sc_rvp;
+ struct ieee80211_node *sc_ni[RT2870_WCID_MAX + 1];
int (*sc_srom_read)(struct run_softc *,
uint16_t, uint16_t *);
@@ -159,7 +170,6 @@ struct run_softc {
uint8_t freq;
uint8_t ntxchains;
uint8_t nrxchains;
- int fixed_ridx;
uint8_t bbp25;
uint8_t bbp26;
@@ -182,7 +192,7 @@ struct run_softc {
struct {
uint8_t reg;
uint8_t val;
- } bbp[8], rf[10];
+ } bbp[10], rf[10];
uint8_t leds;
uint16_t led[3];
uint32_t txpow20mhz[5];
@@ -195,13 +205,36 @@ struct run_softc {
struct run_endpoint_queue sc_epq[RUN_EP_QUEUES];
- struct task wme_task;
- struct task usb_timeout_task;
+ struct task ratectl_task;
+ struct usb_callout ratectl_ch;
+ uint8_t ratectl_run;
+#define RUN_RATECTL_OFF 0
+
+/* need to be power of 2, otherwise RUN_CMDQ_GET fails */
+#define RUN_CMDQ_MAX 16
+#define RUN_CMDQ_MASQ (RUN_CMDQ_MAX - 1)
+ struct run_cmdq cmdq[RUN_CMDQ_MAX];
+ struct task cmdq_task;
+ uint32_t cmdq_store;
+ uint8_t cmdq_exec;
+ uint8_t cmdq_run;
+#define RUN_CMDQ_ABORT 0
+#define RUN_CMDQ_GO 1
struct usb_xfer *sc_xfer[RUN_N_XFER];
struct mbuf *rx_m;
+ uint8_t fifo_cnt;
+
+ uint8_t running;
+ uint8_t runbmap;
+ uint8_t ap_running;
+ uint8_t adhoc_running;
+ uint8_t sta_running;
+ uint8_t rvp_cnt;
+ uint8_t rvp_bmap;
+
union {
struct run_rx_radiotap_header th;
uint8_t pad[64];
OpenPOWER on IntegriCloud