diff options
Diffstat (limited to 'sys/dev/iwi/if_iwivar.h')
-rw-r--r-- | sys/dev/iwi/if_iwivar.h | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/sys/dev/iwi/if_iwivar.h b/sys/dev/iwi/if_iwivar.h index fca0b7a..abc6f9c 100644 --- a/sys/dev/iwi/if_iwivar.h +++ b/sys/dev/iwi/if_iwivar.h @@ -114,11 +114,19 @@ struct iwi_fw { const char *name; /* associated image name */ }; +struct iwi_vap { + struct ieee80211vap iwi_vap; + struct task iwi_authsuccess_task; + struct task iwi_assocsuccess_task; + struct task iwi_assocfailed_task; + + int (*iwi_newstate)(struct ieee80211vap *, + enum ieee80211_state, int); +}; +#define IWI_VAP(vap) ((struct iwi_vap *)(vap)) + struct iwi_softc { struct ifnet *sc_ifp; - struct ieee80211com sc_ic; - int (*sc_newstate)(struct ieee80211com *, - enum ieee80211_state, int); void (*sc_node_free)(struct ieee80211_node *); device_t sc_dev; @@ -129,9 +137,6 @@ struct iwi_softc { struct unrhdr *sc_unr; struct taskqueue *sc_tq; /* private task queue */ struct taskqueue *sc_tq2; /* reset task queue */ -#if __FreeBSD_version < 700000 - struct proc *sc_tqproc; -#endif uint32_t flags; #define IWI_FLAG_FW_INITED (1 << 0) @@ -208,39 +213,31 @@ struct iwi_softc { u_int16_t sc_ledoff; /* off time for current blink */ struct callout sc_ledtimer; /* led off timer */ struct callout sc_wdtimer; /* watchdog timer */ + struct callout sc_rftimer; /* rfkill timer */ int sc_tx_timer; - int sc_rfkill_timer;/* poll for rfkill change */ int sc_state_timer; /* firmware state timer */ int sc_busy_timer; /* firmware cmd timer */ -#define IWI_SCAN_START (1 << 0) -#define IWI_SET_CHANNEL (1 << 1) -#define IWI_SCAN_END (1 << 2) -#define IWI_ASSOC (1 << 3) -#define IWI_DISASSOC (1 << 4) -#define IWI_SCAN_CURCHAN (1 << 5) -#define IWI_SCAN_ALLCHAN (1 << 6) -#define IWI_SET_WME (1 << 7) #define IWI_CMD_MAXOPS 10 - int sc_cmd[IWI_CMD_MAXOPS]; - int sc_cmd_cur; /* current queued scan task */ - int sc_cmd_next; /* last queued scan task */ - unsigned long sc_maxdwell; /* max dwell time for curchan */ - struct bpf_if *sc_drvbpf; + int sc_cmd[IWI_CMD_MAXOPS]; + unsigned long sc_arg[IWI_CMD_MAXOPS]; + int sc_cmd_cur; /* current queued scan task */ + int sc_cmd_next; /* last queued scan task */ +#define IWI_CMD_FREE 0 /* for marking slots unused */ +#define IWI_SCAN_START 1 +#define IWI_SET_CHANNEL 2 +#define IWI_AUTH 3 +#define IWI_ASSOC 4 +#define IWI_DISASSOC 5 +#define IWI_SCAN_CURCHAN 6 +#define IWI_SCAN_ALLCHAN 7 +#define IWI_SET_WME 8 - union { - struct iwi_rx_radiotap_header th; - uint8_t pad[64]; - } sc_rxtapu; -#define sc_rxtap sc_rxtapu.th + struct iwi_rx_radiotap_header sc_rxtap; int sc_rxtap_len; - union { - struct iwi_tx_radiotap_header th; - uint8_t pad[64]; - } sc_txtapu; -#define sc_txtap sc_txtapu.th + struct iwi_tx_radiotap_header sc_txtap; int sc_txtap_len; }; @@ -249,15 +246,15 @@ struct iwi_softc { ("iwi firmware not idle")); \ _sc->fw_state = _state; \ _sc->sc_state_timer = 5; \ - DPRINTF(("enter FW state %d\n", _state)); \ + DPRINTF(("enter %s state\n", iwi_fw_states[_state])); \ } while (0) #define IWI_STATE_END(_sc, _state) do { \ if (_sc->fw_state == _state) \ - DPRINTF(("exit FW state %d\n", _state)); \ + DPRINTF(("exit %s state\n", iwi_fw_states[_state])); \ else \ - DPRINTF(("expected FW state %d, got %d\n", \ - _state, _sc->fw_state)); \ + DPRINTF(("expected %s state, got %s\n", \ + iwi_fw_states[_state], iwi_fw_states[_sc->fw_state])); \ _sc->fw_state = IWI_FW_IDLE; \ wakeup(_sc); \ _sc->sc_state_timer = 0; \ |