summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_zydreg.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_zydreg.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_zydreg.h')
-rw-r--r--sys/dev/usb/wlan/if_zydreg.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/sys/dev/usb/wlan/if_zydreg.h b/sys/dev/usb/wlan/if_zydreg.h
index fabed61..cd60593 100644
--- a/sys/dev/usb/wlan/if_zydreg.h
+++ b/sys/dev/usb/wlan/if_zydreg.h
@@ -1163,12 +1163,6 @@ struct zyd_mac_pair {
uint32_t val;
};
-struct zyd_task {
- struct usb2_proc_msg hdr;
- usb2_proc_callback_t *func;
- struct zyd_softc *sc;
-};
-
struct zyd_tx_data {
STAILQ_ENTRY(zyd_tx_data) next;
struct zyd_softc *sc;
@@ -1248,7 +1242,6 @@ struct zyd_vap {
struct ieee80211vap vap;
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
- struct zyd_softc *sc;
struct ieee80211_amrr amrr;
};
#define ZYD_VAP(vap) ((struct zyd_vap *)(vap))
@@ -1265,27 +1258,14 @@ struct zyd_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb2_device *sc_udev;
- struct usb2_process sc_tq;
struct usb2_xfer *sc_xfer[ZYD_N_TRANSFER];
- struct zyd_task *sc_last_task;
- enum ieee80211_state sc_state;
- int sc_arg;
int sc_flags;
#define ZYD_FLAG_FWLOADED (1 << 0)
#define ZYD_FLAG_INITONCE (1 << 1)
#define ZYD_FLAG_INITDONE (1 << 2)
- struct zyd_task sc_synctask[2];
- struct zyd_task sc_mcasttask[2];
- struct zyd_task sc_scantask[2];
- int sc_scan_action;
-#define ZYD_SCAN_START 0
-#define ZYD_SCAN_END 1
-#define ZYD_SET_CHANNEL 2
- struct zyd_task sc_task[2];
-
struct zyd_rf sc_rf;
STAILQ_HEAD(, zyd_rq) sc_rtx;
@@ -1317,7 +1297,6 @@ struct zyd_softc {
uint8_t sc_ofdm54_cal[14];
struct mtx sc_mtx;
- struct cv sc_cmd_cv;
struct zyd_tx_data tx_data[ZYD_TX_LIST_CNT];
zyd_txdhead tx_q;
zyd_txdhead tx_free;
OpenPOWER on IntegriCloud