diff options
Diffstat (limited to 'sys/dev/ral/rt2661var.h')
-rw-r--r-- | sys/dev/ral/rt2661var.h | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/sys/dev/ral/rt2661var.h b/sys/dev/ral/rt2661var.h index 9f12a15..0c15840 100644 --- a/sys/dev/ral/rt2661var.h +++ b/sys/dev/ral/rt2661var.h @@ -51,7 +51,8 @@ struct rt2661_tx_data { bus_dmamap_t map; struct mbuf *m; struct ieee80211_node *ni; - struct ral_rssdesc id; + uint8_t rix; + int8_t rssi; }; struct rt2661_tx_ring { @@ -87,14 +88,21 @@ struct rt2661_rx_ring { struct rt2661_node { struct ieee80211_node ni; - struct ral_rssadapt rssadapt; + struct ieee80211_amrr_node amrr; }; +#define RT2661_NODE(ni) ((struct rt2661_node *)(ni)) + +struct rt2661_vap { + struct ieee80211vap ral_vap; + struct ieee80211_amrr amrr; + + int (*ral_newstate)(struct ieee80211vap *, + enum ieee80211_state, int); +}; +#define RT2661_VAP(vap) ((struct rt2661_vap *)(vap)) struct rt2661_softc { struct ifnet *sc_ifp; - struct ieee80211com sc_ic; - int (*sc_newstate)(struct ieee80211com *, - enum ieee80211_state, int); device_t sc_dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; @@ -102,15 +110,21 @@ struct rt2661_softc { struct mtx sc_mtx; struct callout watchdog_ch; - struct callout rssadapt_ch; int sc_tx_timer; int sc_invalid; + int sc_debug; + + const struct ieee80211_rate_table *sc_rates; /* * The same in both up to here * ------------------------------------------------ */ + int sc_flags; +#define RAL_FW_LOADED 0x1 +#define RAL_INPUT_RUNNING 0x2 + int sc_id; struct ieee80211_channel *sc_curchan; uint8_t rf_rev; @@ -148,23 +162,10 @@ struct rt2661_softc { int dwelltime; - struct bpf_if *sc_drvbpf; - - union { - struct rt2661_rx_radiotap_header th; - uint8_t pad[64]; - } sc_rxtapu; -#define sc_rxtap sc_rxtapu.th + struct rt2661_rx_radiotap_header sc_rxtap; int sc_rxtap_len; - - union { - struct rt2661_tx_radiotap_header th; - uint8_t pad[64]; - } sc_txtapu; -#define sc_txtap sc_txtapu.th + struct rt2661_tx_radiotap_header sc_txtap; int sc_txtap_len; -#define RAL_INPUT_RUNNING 1 - int sc_flags; }; int rt2661_attach(device_t, int); @@ -174,5 +175,6 @@ void rt2661_suspend(void *); void rt2661_resume(void *); void rt2661_intr(void *); -#define RAL_LOCK(sc) mtx_lock(&(sc)->sc_mtx) -#define RAL_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define RAL_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define RAL_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define RAL_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) |