Deleted Added
full compact
if_wpivar.h (179037) if_wpivar.h (191746)
1/* $FreeBSD: head/sys/dev/wpi/if_wpivar.h 179037 2008-05-16 04:15:54Z thompsa $ */
1/* $FreeBSD: head/sys/dev/wpi/if_wpivar.h 191746 2009-05-02 15:14:18Z thompsa $ */
2
3/*-
4 * Copyright (c) 2006,2007
5 * Damien Bergamini <damien.bergamini@free.fr>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.

--- 129 unchanged lines hidden (view full) ---

139 struct ifnet *sc_ifp;
140 struct mtx sc_mtx;
141
142 /* Flags indicating the current state the driver
143 * expects the hardware to be in
144 */
145 uint32_t flags;
146#define WPI_FLAG_HW_RADIO_OFF (1 << 0)
2
3/*-
4 * Copyright (c) 2006,2007
5 * Damien Bergamini <damien.bergamini@free.fr>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.

--- 129 unchanged lines hidden (view full) ---

139 struct ifnet *sc_ifp;
140 struct mtx sc_mtx;
141
142 /* Flags indicating the current state the driver
143 * expects the hardware to be in
144 */
145 uint32_t flags;
146#define WPI_FLAG_HW_RADIO_OFF (1 << 0)
147#define WPI_FLAG_SCANNING (1 << 1)
148#define WPI_FLAG_BUSY (1 << 2)
149#define WPI_FLAG_AUTH (1 << 3)
147#define WPI_FLAG_BUSY (1 << 1)
148#define WPI_FLAG_AUTH (1 << 2)
150
151 /* shared area */
152 struct wpi_dma_info shared_dma;
153 struct wpi_shared *shared;
154
155 struct wpi_tx_ring txq[WME_NUM_AC];
156 struct wpi_tx_ring cmdq;
157 struct wpi_rx_ring rxq;

--- 30 unchanged lines hidden (view full) ---

188 int sc_txtap_len;
189
190 /* firmware image */
191 const struct firmware *fw_fp;
192
193 /* firmware DMA transfer */
194 struct wpi_dma_info fw_dma;
195
149
150 /* shared area */
151 struct wpi_dma_info shared_dma;
152 struct wpi_shared *shared;
153
154 struct wpi_tx_ring txq[WME_NUM_AC];
155 struct wpi_tx_ring cmdq;
156 struct wpi_rx_ring rxq;

--- 30 unchanged lines hidden (view full) ---

187 int sc_txtap_len;
188
189 /* firmware image */
190 const struct firmware *fw_fp;
191
192 /* firmware DMA transfer */
193 struct wpi_dma_info fw_dma;
194
196 /* command queue related variables */
197#define WPI_SCAN_START (1<<0)
198#define WPI_SCAN_CURCHAN (1<<1)
199#define WPI_SCAN_STOP (1<<2)
200#define WPI_SET_CHAN (1<<3)
201#define WPI_AUTH (1<<4)
202#define WPI_RUN (1<<5)
203#define WPI_SCAN_NEXT (1<<6)
204#define WPI_RESTART (1<<7)
205#define WPI_RF_RESTART (1<<8)
206#define WPI_CMD_MAXOPS 10
207 /* command queuing request type */
208#define WPI_QUEUE_NORMAL 0
209#define WPI_QUEUE_CLEAR 1
210 int sc_cmd[WPI_CMD_MAXOPS];
211 int sc_cmd_arg[WPI_CMD_MAXOPS];
212 int sc_cmd_cur; /* current queued scan task */
213 int sc_cmd_next; /* last queued scan task */
214 struct mtx sc_cmdlock;
215
216 /* Task queues used to control the driver */
217 struct taskqueue *sc_tq; /* Main command task queue */
218 struct taskqueue *sc_tq2; /* firmware reset task queue */
219
220 /* Tasks used by the driver */
195 /* Tasks used by the driver */
221 struct task sc_radioontask; /* enable rf transmitter task*/
222 struct task sc_radioofftask;/* disable rf transmitter task*/
223 struct task sc_opstask; /* operation handling task */
224 struct task sc_restarttask; /* reset firmware task */
196 struct task sc_restarttask; /* reset firmware task */
225 struct task sc_bmiss_task; /* beacon miss */
197 struct task sc_radiotask; /* reset rf task */
226
227 /* Eeprom info */
228 uint8_t cap;
229 uint16_t rev;
230 uint8_t type;
231 struct wpi_power_group groups[WPI_POWER_GROUPS_COUNT];
232 int8_t maxpwr[IEEE80211_CHAN_MAX];
233 char domain[4]; /*reglatory domain XXX */
234};
235#define WPI_LOCK_INIT(_sc) \
236 mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \
237 MTX_NETWORK_LOCK, MTX_DEF)
238#define WPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
239#define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
240#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED)
241#define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
198
199 /* Eeprom info */
200 uint8_t cap;
201 uint16_t rev;
202 uint8_t type;
203 struct wpi_power_group groups[WPI_POWER_GROUPS_COUNT];
204 int8_t maxpwr[IEEE80211_CHAN_MAX];
205 char domain[4]; /*reglatory domain XXX */
206};
207#define WPI_LOCK_INIT(_sc) \
208 mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \
209 MTX_NETWORK_LOCK, MTX_DEF)
210#define WPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
211#define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
212#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED)
213#define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
242
243#define WPI_CMD_LOCK_INIT(_sc) \
244 mtx_init(&(_sc)->sc_cmdlock, device_get_nameunit((_sc)->sc_dev), \
245 NULL, MTX_DEF)
246#define WPI_CMD_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_cmdlock)
247#define WPI_CMD_LOCK(_sc) mtx_lock(&(_sc)->sc_cmdlock)
248#define WPI_CMD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_cmdlock)