summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_rumvar.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-05-02 15:14:18 +0000
committerthompsa <thompsa@FreeBSD.org>2009-05-02 15:14:18 +0000
commited7c3176b96444dc82c6a07114013192611024f3 (patch)
tree46c2c9933cb1753f24ffd7c0096b2ba9074180d2 /sys/dev/usb/wlan/if_rumvar.h
parentb704e6092a4076e74c276c0d531447a8cb3bf6a6 (diff)
downloadFreeBSD-src-ed7c3176b96444dc82c6a07114013192611024f3.zip
FreeBSD-src-ed7c3176b96444dc82c6a07114013192611024f3.tar.gz
Create a taskqueue for each wireless interface which provides a serialised
sleepable context for net80211 driver callbacks. This removes the need for USB and firmware based drivers to roll their own code to defer the chip programming for state changes, scan requests, channel changes and mcast/promisc updates. When a driver callback completes the hardware state is now guaranteed to have been updated and is in sync with net80211 layer. This nukes around 1300 lines of code from the wireless device drivers making them more readable and less race prone. The net80211 layer has been updated as follows - all state/channel changes are serialised on the taskqueue. - ieee80211_new_state() always queues and can now be called from any context - scanning runs from a single taskq function and executes to completion. driver callbacks are synchronous so the channel, phy mode and rx filters are guaranteed to be set in hardware before probe request frames are transmitted. Help and contributions from Sam Leffler. Reviewed by: sam
Diffstat (limited to 'sys/dev/usb/wlan/if_rumvar.h')
-rw-r--r--sys/dev/usb/wlan/if_rumvar.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/sys/dev/usb/wlan/if_rumvar.h b/sys/dev/usb/wlan/if_rumvar.h
index d6b8137..2ba4007 100644
--- a/sys/dev/usb/wlan/if_rumvar.h
+++ b/sys/dev/usb/wlan/if_rumvar.h
@@ -54,12 +54,6 @@ struct rum_tx_radiotap_header {
struct rum_softc;
-struct rum_task {
- struct usb2_proc_msg hdr;
- usb2_proc_callback_t *func;
- struct rum_softc *sc;
-};
-
struct rum_tx_data {
STAILQ_ENTRY(rum_tx_data) next;
struct rum_softc *sc;
@@ -78,11 +72,10 @@ struct rum_node {
struct rum_vap {
struct ieee80211vap vap;
- struct rum_softc *sc;
struct ieee80211_beacon_offsets bo;
struct ieee80211_amrr amrr;
struct usb2_callout amrr_ch;
- struct rum_task amrr_task[2];
+ struct task amrr_task;
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
@@ -99,32 +92,18 @@ struct rum_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb2_device *sc_udev;
- struct usb2_process sc_tq;
struct usb2_xfer *sc_xfer[RUM_N_TRANSFER];
- struct rum_task *sc_last_task;
uint8_t rf_rev;
uint8_t rffreq;
- enum ieee80211_state sc_state;
- int sc_arg;
- struct rum_task sc_synctask[2];
- struct rum_task sc_task[2];
- struct rum_task sc_promisctask[2];
- struct rum_task sc_scantask[2];
- int sc_scan_action;
-#define RUM_SCAN_START 0
-#define RUM_SCAN_END 1
-#define RUM_SET_CHANNEL 2
-
struct rum_tx_data tx_data[RUM_TX_LIST_COUNT];
rum_txdhead tx_q;
rum_txdhead tx_free;
int tx_nfree;
struct rum_rx_desc sc_rx_desc;
- struct cv sc_cmd_cv;
struct mtx sc_mtx;
uint32_t sta[6];
OpenPOWER on IntegriCloud