1 /* $NetBSD: if_rumvar.h$ */
2 /* $OpenBSD: if_rumvar.h,v 1.7 2006/11/13 20:06:38 damien Exp $ */
5 * Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
6 * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org>
8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 #define RUM_RX_LIST_COUNT 1
22 #define RUM_TX_LIST_COUNT 1
24 struct rum_rx_radiotap_header
{
25 struct ieee80211_radiotap_header wr_ihdr
;
28 uint16_t wr_chan_freq
;
29 uint16_t wr_chan_flags
;
34 #define RT2573_RX_RADIOTAP_PRESENT \
35 ((1 << IEEE80211_RADIOTAP_FLAGS) | \
36 (1 << IEEE80211_RADIOTAP_RATE) | \
37 (1 << IEEE80211_RADIOTAP_CHANNEL) | \
38 (1 << IEEE80211_RADIOTAP_ANTENNA) | \
39 (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL))
41 struct rum_tx_radiotap_header
{
42 struct ieee80211_radiotap_header wt_ihdr
;
45 uint16_t wt_chan_freq
;
46 uint16_t wt_chan_flags
;
50 #define RT2573_TX_RADIOTAP_PRESENT \
51 ((1 << IEEE80211_RADIOTAP_FLAGS) | \
52 (1 << IEEE80211_RADIOTAP_RATE) | \
53 (1 << IEEE80211_RADIOTAP_CHANNEL) | \
54 (1 << IEEE80211_RADIOTAP_ANTENNA))
60 usbd_xfer_handle xfer
;
63 struct ieee80211_node
*ni
;
68 usbd_xfer_handle xfer
;
75 struct ethercom sc_ec
;
76 #define sc_if sc_ec.ec_if
77 struct ieee80211com sc_ic
;
78 int (*sc_newstate
)(struct ieee80211com
*,
79 enum ieee80211_state
, int);
81 usbd_device_handle sc_udev
;
82 usbd_interface_handle sc_iface
;
84 #define RT2573_FWLOADED (1 << 0)
86 struct ieee80211_channel
*sc_curchan
;
95 usbd_xfer_handle amrr_xfer
;
97 usbd_pipe_handle sc_rx_pipeh
;
98 usbd_pipe_handle sc_tx_pipeh
;
100 enum ieee80211_state sc_state
;
101 struct usb_task sc_task
;
103 struct ieee80211_amrr amrr
;
104 struct ieee80211_amrr_node amn
;
106 struct rum_rx_data rx_data
[RUM_RX_LIST_COUNT
];
107 struct rum_tx_data tx_data
[RUM_TX_LIST_COUNT
];
110 struct ieee80211_beacon_offsets sc_bo
;
112 usb_callout_t sc_scan_ch
;
113 usb_callout_t sc_amrr_ch
;
124 } __packed bbp_prom
[16];
141 struct rum_rx_radiotap_header th
;
144 #define sc_rxtap sc_rxtapu.th
148 struct rum_tx_radiotap_header th
;
151 #define sc_txtap sc_txtapu.th