Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/dev/usb2/wlan/if_uralvar.h 187378 2009-01-18 05:35:58Z thompsa $ */
---
> /* $FreeBSD: head/sys/dev/usb2/wlan/if_uralvar.h 188417 2009-02-09 22:12:47Z thompsa $ */
20,23c20
< struct ural_node {
< struct ieee80211_node ni;
< struct ieee80211_amrr_node amn;
< };
---
> #define RAL_TX_LIST_COUNT 8
25c22,24
< #define URAL_NODE(ni) ((struct ural_node *)(ni))
---
> #define URAL_SCAN_START 1
> #define URAL_SCAN_END 2
> #define URAL_SET_CHANNEL 3
27,30d25
< struct ural_vap {
< struct ieee80211vap vap;
< struct ieee80211_beacon_offsets bo;
< struct ieee80211_amrr amrr;
32,33c27,34
< int (*newstate) (struct ieee80211vap *,
< enum ieee80211_state, int);
---
> struct ural_rx_radiotap_header {
> struct ieee80211_radiotap_header wr_ihdr;
> uint8_t wr_flags;
> uint8_t wr_rate;
> uint16_t wr_chan_freq;
> uint16_t wr_chan_flags;
> uint8_t wr_antenna;
> uint8_t wr_antsignal;
36c37,42
< #define URAL_VAP(vap) ((struct ural_vap *)(vap))
---
> #define RAL_RX_RADIOTAP_PRESENT \
> ((1 << IEEE80211_RADIOTAP_FLAGS) | \
> (1 << IEEE80211_RADIOTAP_RATE) | \
> (1 << IEEE80211_RADIOTAP_CHANNEL) | \
> (1 << IEEE80211_RADIOTAP_ANTENNA) | \
> (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL))
38,46c44,50
< struct ural_config_copy_chan {
< uint32_t chan_to_ieee;
< enum ieee80211_phymode chan_to_mode;
< uint8_t chan_is_5ghz:1;
< uint8_t chan_is_2ghz:1;
< uint8_t chan_is_b:1;
< uint8_t chan_is_a:1;
< uint8_t chan_is_g:1;
< uint8_t unused:3;
---
> struct ural_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;
> uint8_t wt_antenna;
49,53c53,57
< struct ural_config_copy_bss {
< uint16_t ni_intval;
< uint8_t ni_bssid[IEEE80211_ADDR_LEN];
< uint8_t fixed_rate_none;
< };
---
> #define RAL_TX_RADIOTAP_PRESENT \
> ((1 << IEEE80211_RADIOTAP_FLAGS) | \
> (1 << IEEE80211_RADIOTAP_RATE) | \
> (1 << IEEE80211_RADIOTAP_CHANNEL) | \
> (1 << IEEE80211_RADIOTAP_ANTENNA))
55,58c59
< struct ural_config_copy {
< struct ural_config_copy_chan ic_curchan;
< struct ural_config_copy_chan ic_bsschan;
< struct ural_config_copy_bss iv_bss;
---
> struct ural_softc;
60,68c61,63
< enum ieee80211_opmode ic_opmode;
< uint32_t ic_flags;
< uint32_t if_flags;
<
< uint16_t ic_txpowlimit;
< uint16_t ic_curmode;
<
< uint8_t ic_myaddr[IEEE80211_ADDR_LEN];
< uint8_t if_broadcastaddr[IEEE80211_ADDR_LEN];
---
> struct ural_task {
> struct usb2_proc_msg hdr;
> struct ural_softc *sc;
71,78c66,72
< struct ural_rx_radiotap_header {
< struct ieee80211_radiotap_header wr_ihdr;
< uint8_t wr_flags;
< uint8_t wr_rate;
< uint16_t wr_chan_freq;
< uint16_t wr_chan_flags;
< uint8_t wr_antenna;
< uint8_t wr_antsignal;
---
> struct ural_tx_data {
> STAILQ_ENTRY(ural_tx_data) next;
> struct ural_softc *sc;
> struct ural_tx_desc desc;
> struct mbuf *m;
> struct ieee80211_node *ni;
> int rate;
79a74
> typedef STAILQ_HEAD(, ural_tx_data) ural_txdhead;
81,94c76,78
< #define RAL_RX_RADIOTAP_PRESENT \
< ((1 << IEEE80211_RADIOTAP_FLAGS) | \
< (1 << IEEE80211_RADIOTAP_RATE) | \
< (1 << IEEE80211_RADIOTAP_CHANNEL) | \
< (1 << IEEE80211_RADIOTAP_ANTENNA) | \
< (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL))
<
< struct ural_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;
< uint8_t wt_antenna;
---
> struct ural_node {
> struct ieee80211_node ni;
> struct ieee80211_amrr_node amn;
95a80
> #define URAL_NODE(ni) ((struct ural_node *)(ni))
97,101c82,88
< #define RAL_TX_RADIOTAP_PRESENT \
< ((1 << IEEE80211_RADIOTAP_FLAGS) | \
< (1 << IEEE80211_RADIOTAP_RATE) | \
< (1 << IEEE80211_RADIOTAP_CHANNEL) | \
< (1 << IEEE80211_RADIOTAP_ANTENNA))
---
> struct ural_vap {
> struct ieee80211vap vap;
> struct ural_softc *sc;
> struct ieee80211_beacon_offsets bo;
> struct ieee80211_amrr amrr;
> struct usb2_callout amrr_ch;
> struct ural_task amrr_task[2];
103,111c90,91
< struct ural_bbp_prom {
< uint8_t val;
< uint8_t reg;
< } __packed;
<
< struct ural_ifq {
< struct mbuf *ifq_head;
< struct mbuf *ifq_tail;
< uint16_t ifq_len;
---
> int (*newstate)(struct ieee80211vap *,
> enum ieee80211_state, int);
112a93
> #define URAL_VAP(vap) ((struct ural_vap *)(vap))
115,119c96,98
< URAL_BULK_DT_WR,
< URAL_BULK_DT_RD,
< URAL_BULK_CS_WR,
< URAL_BULK_CS_RD,
< URAL_N_TRANSFER = 4,
---
> URAL_BULK_WR,
> URAL_BULK_RD,
> URAL_N_TRANSFER = 2,
123c102,105
< struct ifnet *sc_ifp;
---
> struct ifnet *sc_ifp;
> device_t sc_dev;
> struct usb2_device *sc_udev;
> struct usb2_process sc_tq;
125,136d106
< struct ural_ifq sc_tx_queue;
< struct usb2_config_td sc_config_td;
< struct ural_tx_desc sc_tx_desc;
< struct ural_rx_desc sc_rx_desc;
< struct mtx sc_mtx;
< struct usb2_callout sc_watchdog;
< struct ural_bbp_prom sc_bbp_prom[16];
< struct ural_rx_radiotap_header sc_rxtap;
< struct ural_tx_radiotap_header sc_txtap;
<
< struct usb2_xfer *sc_xfer[URAL_N_TRANSFER];
< struct usb2_device *sc_udev;
139,143c109,110
< enum ieee80211_state sc_ns_state;
< uint32_t sc_unit;
< uint32_t sc_asic_rev;
< uint32_t sc_rf_regs[4];
< int sc_ns_arg;
---
> uint32_t asic_rev;
> uint8_t rf_rev;
145,153c112
< uint16_t sc_flags;
< #define URAL_FLAG_READ_STALL 0x0001
< #define URAL_FLAG_WRITE_STALL 0x0002
< #define URAL_FLAG_LL_READY 0x0004
< #define URAL_FLAG_HL_READY 0x0008
< #define URAL_FLAG_WAIT_COMMAND 0x0010
< uint16_t sc_txtap_len;
< uint16_t sc_rxtap_len;
< uint16_t sc_sta[11];
---
> struct usb2_xfer *sc_xfer[URAL_N_TRANSFER];
155,163c114,120
< uint8_t sc_rf_rev;
< uint8_t sc_txpow[14];
< uint8_t sc_led_mode;
< uint8_t sc_hw_radio;
< uint8_t sc_rx_ant;
< uint8_t sc_tx_ant;
< uint8_t sc_nb_ant;
< uint8_t sc_amrr_timer;
< uint8_t sc_myaddr[IEEE80211_ADDR_LEN];
---
> enum ieee80211_state sc_state;
> int sc_arg;
> int sc_scan_action; /* should be an enum */
> struct ural_task sc_synctask[2];
> struct ural_task sc_task[2];
> struct ural_task sc_promisctask[2];
> struct ural_task sc_scantask[2];
165c122,150
< char sc_name[32];
---
> struct ural_tx_data tx_data[RAL_TX_LIST_COUNT];
> ural_txdhead tx_q;
> ural_txdhead tx_free;
> int tx_nfree;
> struct ural_rx_desc sc_rx_desc;
>
> struct mtx sc_mtx;
>
> uint16_t sta[11];
> uint32_t rf_regs[4];
> uint8_t txpow[14];
> uint8_t sc_bssid[6];
>
> struct {
> uint8_t val;
> uint8_t reg;
> } __packed bbp_prom[16];
>
> int led_mode;
> int hw_radio;
> int rx_ant;
> int tx_ant;
> int nb_ant;
>
> struct ural_rx_radiotap_header sc_rxtap;
> int sc_rxtap_len;
>
> struct ural_tx_radiotap_header sc_txtap;
> int sc_txtap_len;
166a152,155
>
> #define RAL_LOCK(sc) mtx_lock(&(sc)->sc_mtx)
> #define RAL_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
> #define RAL_LOCK_ASSERT(sc, t) mtx_assert(&(sc)->sc_mtx, t)