diff options
Diffstat (limited to 'sys/dev/ic/rt2661var.h')
-rw-r--r-- | sys/dev/ic/rt2661var.h | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/sys/dev/ic/rt2661var.h b/sys/dev/ic/rt2661var.h index 05b63343937..0f911753810 100644 --- a/sys/dev/ic/rt2661var.h +++ b/sys/dev/ic/rt2661var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661var.h,v 1.1 2006/01/09 20:03:34 damien Exp $ */ +/* $OpenBSD: rt2661var.h,v 1.2 2006/01/10 21:20:46 damien Exp $ */ /*- * Copyright (c) 2006 @@ -17,10 +17,39 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +struct rt2661_rx_radiotap_header { + struct ieee80211_radiotap_header wr_ihdr; + uint64_t wr_tsf; + uint8_t wr_flags; + uint16_t wr_chan_freq; + uint16_t wr_chan_flags; + uint8_t wr_antsignal; +} __packed; + +#define RT2661_RX_RADIOTAP_PRESENT \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ + (1 << IEEE80211_RADIOTAP_FLAGS) | \ + (1 << IEEE80211_RADIOTAP_CHANNEL) | \ + (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL)) + +struct rt2661_tx_radiotap_header { + struct ieee80211_radiotap_header wt_ihdr; + uint8_t wt_flags; + uint8_t wt_rate; + uint16_t wt_chan_freq; + uint16_t wt_chan_flags; +} __packed; + +#define RT2661_TX_RADIOTAP_PRESENT \ + ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + (1 << IEEE80211_RADIOTAP_RATE) | \ + (1 << IEEE80211_RADIOTAP_CHANNEL)) + struct rt2661_tx_data { - bus_dmamap_t map; - struct mbuf *m; - struct ieee80211_node *ni; + bus_dmamap_t map; + struct mbuf *m; + struct ieee80211_node *ni; + struct ieee80211_rssdesc id; }; struct rt2661_tx_ring { @@ -52,6 +81,11 @@ struct rt2661_rx_ring { int next; }; +struct rt2661_node { + struct ieee80211_node ni; + struct ieee80211_rssadapt rssadapt; +}; + struct rt2661_softc { struct device sc_dev; @@ -68,6 +102,7 @@ struct rt2661_softc { bus_space_handle_t sc_sh; struct timeout scan_ch; + struct timeout rssadapt_ch; int sc_id; int sc_flags; @@ -87,14 +122,13 @@ struct rt2661_softc { struct rt2661_rx_ring rxq; uint32_t rf_regs[4]; - uint8_t txpow[14]; + int8_t txpow[38]; struct { uint8_t reg; uint8_t val; } bbp_prom[16]; - int led_mode; int hw_radio; int rx_ant; int tx_ant; @@ -110,6 +144,24 @@ struct rt2661_softc { uint8_t bbp16; uint8_t bbp17; uint8_t bbp64; + +#if NBPFILTER > 0 + caddr_t sc_drvbpf; + + union { + struct rt2661_rx_radiotap_header th; + uint8_t pad[64]; + } sc_rxtapu; +#define sc_rxtap sc_rxtapu.th + int sc_rxtap_len; + + union { + struct rt2661_tx_radiotap_header th; + uint8_t pad[64]; + } sc_txtapu; +#define sc_txtap sc_txtapu.th + int sc_txtap_len; +#endif }; int rt2661_attach(void *, int); |