summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_uralvar.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_uralvar.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_uralvar.h')
-rw-r--r--sys/dev/usb/wlan/if_uralvar.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/dev/usb/wlan/if_uralvar.h b/sys/dev/usb/wlan/if_uralvar.h
index 13a3df8..5149f6b 100644
--- a/sys/dev/usb/wlan/if_uralvar.h
+++ b/sys/dev/usb/wlan/if_uralvar.h
@@ -59,12 +59,6 @@ struct ural_tx_radiotap_header {
struct ural_softc;
-struct ural_task {
- struct usb2_proc_msg hdr;
- usb2_proc_callback_t *func;
- struct ural_softc *sc;
-};
-
struct ural_tx_data {
STAILQ_ENTRY(ural_tx_data) next;
struct ural_softc *sc;
@@ -83,11 +77,10 @@ struct ural_node {
struct ural_vap {
struct ieee80211vap vap;
- struct ural_softc *sc;
struct ieee80211_beacon_offsets bo;
struct ieee80211_amrr amrr;
struct usb2_callout amrr_ch;
- struct ural_task amrr_task[2];
+ struct task amrr_task;
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
@@ -104,21 +97,11 @@ struct ural_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb2_device *sc_udev;
- struct usb2_process sc_tq;
uint32_t asic_rev;
uint8_t rf_rev;
struct usb2_xfer *sc_xfer[URAL_N_TRANSFER];
- struct ural_task *sc_last_task;
-
- enum ieee80211_state sc_state;
- int sc_arg;
- int sc_scan_action; /* should be an enum */
- struct ural_task sc_synctask[2];
- struct ural_task sc_task[2];
- struct ural_task sc_promisctask[2];
- struct ural_task sc_scantask[2];
struct ural_tx_data tx_data[RAL_TX_LIST_COUNT];
ural_txdhead tx_q;
@@ -127,7 +110,6 @@ struct ural_softc {
struct ural_rx_desc sc_rx_desc;
struct mtx sc_mtx;
- struct cv sc_cmd_cv;
uint16_t sta[11];
uint32_t rf_regs[4];
OpenPOWER on IntegriCloud