iPXE
ath9k.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2011 Atheros Communications Inc.
3  *
4  * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5  * Original from Linux kernel 3.0.1
6  *
7  * Permission to use, copy, modify, and/or 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.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef ATH9K_H
21 #define ATH9K_H
22 
23 FILE_LICENCE ( BSD2 );
24 FILE_SECBOOT ( FORBIDDEN );
25 
26 #include "common.h"
27 
28 /*
29  * Header for the ath9k.ko driver core *only* -- hw code nor any other driver
30  * should rely on this file or its contents.
31  */
32 
33 struct ath_node;
34 struct ath_softc;
35 
36 /* Macro to expand scalars to 64-bit objects */
37 
38 #define ito64(x) (sizeof(x) == 1) ? \
39  (((unsigned long long int)(x)) & (0xff)) : \
40  (sizeof(x) == 2) ? \
41  (((unsigned long long int)(x)) & 0xffff) : \
42  ((sizeof(x) == 4) ? \
43  (((unsigned long long int)(x)) & 0xffffffff) : \
44  (unsigned long long int)(x))
45 
46 /* increment with wrap-around */
47 #define INCR(_l, _sz) do { \
48  (_l)++; \
49  (_l) &= ((_sz) - 1); \
50  } while (0)
51 
52 /* decrement with wrap-around */
53 #define DECR(_l, _sz) do { \
54  (_l)--; \
55  (_l) &= ((_sz) - 1); \
56  } while (0)
57 
58 #define A_MAX(a, b) ((a) > (b) ? (a) : (b))
59 
60 #define TSF_TO_TU(_h,_l) \
61  ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
62 
63 #define ATH_TXQ_SETUP(sc, i) ((sc)->tx.txqsetup & (1<<i))
64 
65 struct ath_config {
68 };
69 
70 /*************************/
71 /* Descriptor Management */
72 /*************************/
73 
74 #define ATH_TXBUF_RESET(_bf) do { \
75  (_bf)->bf_stale = 0; \
76  (_bf)->bf_lastbf = NULL; \
77  (_bf)->bf_next = NULL; \
78  memset(&((_bf)->bf_state), 0, \
79  sizeof(struct ath_buf_state)); \
80  } while (0)
81 
82 #define ATH_RXBUF_RESET(_bf) do { \
83  (_bf)->bf_stale = 0; \
84  } while (0)
85 
86 /**
87  * enum buffer_type - Buffer type flags
88  *
89  * @BUF_AMPDU: This buffer is an ampdu, as part of an aggregate (during TX)
90  * @BUF_AGGR: Indicates whether the buffer can be aggregated
91  * (used in aggregation scheduling)
92  * @BUF_XRETRY: To denote excessive retries of the buffer
93  */
95  BUF_AMPDU = BIT(0),
96  BUF_AGGR = BIT(1),
98 };
99 
100 #define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU)
101 #define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR)
102 #define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY)
103 
104 #define ATH_TXSTATUS_RING_SIZE 64
105 
106 struct ath_descdma {
107  void *dd_desc;
111 };
112 
113 int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
114  struct list_head *head, const char *name,
115  int nbuf, int ndesc, int is_tx);
116 void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
117  struct list_head *head);
118 
119 /***********/
120 /* RX / TX */
121 /***********/
122 
123 #define ATH_RXBUF 16
124 #define ATH_TXBUF 16
125 #define ATH_TXBUF_RESERVE 5
126 #define ATH_MAX_QDEPTH (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE)
127 #define ATH_TXMAXTRY 13
128 
129 #define TID_TO_WME_AC(_tid) \
130  ((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \
131  (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \
132  (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
133  WME_AC_VO)
134 
135 #define ATH_AGGR_DELIM_SZ 4
136 #define ATH_AGGR_MINPLEN 256 /* in bytes, minimum packet length */
137 /* number of delimiters for encryption padding */
138 #define ATH_AGGR_ENCRYPTDELIM 10
139 /* minimum h/w qdepth to be sustained to maximize aggregation */
140 #define ATH_AGGR_MIN_QDEPTH 2
141 #define ATH_AMPDU_SUBFRAME_DEFAULT 32
142 
143 #define FCS_LEN 4
144 #define IEEE80211_SEQ_SEQ_SHIFT 4
145 #define IEEE80211_SEQ_MAX 4096
146 #define IEEE80211_WEP_IVLEN 3
147 #define IEEE80211_WEP_KIDLEN 1
148 #define IEEE80211_WEP_CRCLEN 4
149 #define IEEE80211_MAX_MPDU_LEN (3840 + FCS_LEN + \
150  (IEEE80211_WEP_IVLEN + \
151  IEEE80211_WEP_KIDLEN + \
152  IEEE80211_WEP_CRCLEN))
153 
154 /* return whether a bit at index _n in bitmap _bm is set
155  * _sz is the size of the bitmap */
156 #define ATH_BA_ISSET(_bm, _n) (((_n) < (WME_BA_BMP_SIZE)) && \
157  ((_bm)[(_n) >> 5] & (1 << ((_n) & 31))))
158 
159 /* return block-ack bitmap index given sequence and starting sequence */
160 #define ATH_BA_INDEX(_st, _seq) (((_seq) - (_st)) & (IEEE80211_SEQ_MAX - 1))
161 
162 /* returns delimiter padding required given the packet length */
163 #define ATH_AGGR_GET_NDELIM(_len) \
164  (((_len) >= ATH_AGGR_MINPLEN) ? 0 : \
165  DIV_ROUND_UP(ATH_AGGR_MINPLEN - (_len), ATH_AGGR_DELIM_SZ))
166 
167 #define BAW_WITHIN(_start, _bawsz, _seqno) \
168  ((((_seqno) - (_start)) & 4095) < (_bawsz))
169 
170 #define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)])
171 
172 #define ATH_TX_COMPLETE_POLL_INT 1000
173 
178 };
179 
180 #define ATH_TXFIFO_DEPTH 8
181 struct ath_txq {
182  int mac80211_qnum; /* mac80211 queue number, -1 means not mac80211 Q */
183  u32 axq_qnum; /* ath9k hardware queue number */
185  struct list_head axq_q;
188  int stopped;
196 };
197 
198 struct ath_atx_ac {
199  struct ath_txq *txq;
200  int sched;
201  struct list_head list;
202  struct list_head tid_q;
204 };
205 
207  int framelen;
212 };
213 
217  unsigned long bfs_paprd_timestamp;
218 };
219 
220 struct ath_buf {
221  struct list_head list;
222  struct ath_buf *bf_lastbf; /* last buf of this unit (a frame or
223  an aggregate) */
224  struct ath_buf *bf_next; /* next subframe in the aggregate */
225  struct io_buffer *bf_mpdu; /* enclosing frame structure */
226  void *bf_desc; /* virtual addr of desc */
227  u32 bf_daddr; /* physical addr of desc */
228  u32 bf_buf_addr; /* physical addr of data buffer, for DMA */
229  int bf_stale;
232 };
233 
234 struct ath_atx_tid {
235  struct list_head list;
236  struct list_head buf_q;
237  struct ath_node *an;
238  struct ath_atx_ac *ac;
243  int tidno;
244  int baw_head; /* first un-acked tx buffer */
245  int baw_tail; /* next unused tx buffer slot */
246  int sched;
247  int paused;
249 };
250 
251 struct ath_node {
254  int ps_key;
255 
258 
259  int sleeping;
260 };
261 
262 #define AGGR_CLEANUP BIT(1)
263 #define AGGR_ADDBA_COMPLETE BIT(2)
264 #define AGGR_ADDBA_PROGRESS BIT(3)
265 
267  struct ath_txq *txq;
268  struct ath_node *an;
269  int if_id;
271 };
272 
273 #define ATH_TX_ERROR 0x01
274 #define ATH_TX_XRETRY 0x02
275 #define ATH_TX_BAR 0x04
276 
277 /**
278  * @txq_map: Index is mac80211 queue number. This is
279  * not necessarily the same as the hardware queue number
280  * (axq_qnum).
281  */
282 struct ath_tx {
285  struct list_head txbuf;
289 };
290 
291 struct ath_rx_edma {
295 };
296 
297 struct ath_rx {
301  unsigned int rxfilter;
302  struct list_head rxbuf;
306 
307  struct io_buffer *frag;
308 };
309 
310 int ath_startrecv(struct ath_softc *sc);
311 int ath_stoprecv(struct ath_softc *sc);
312 void ath_flushrecv(struct ath_softc *sc);
313 u32 ath_calcrxfilter(struct ath_softc *sc);
314 int ath_rx_init(struct ath_softc *sc, int nbufs);
315 void ath_rx_cleanup(struct ath_softc *sc);
316 int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp);
317 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
318 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq);
319 int ath_drain_all_txq(struct ath_softc *sc, int retry_tx);
320 void ath_draintxq(struct ath_softc *sc,
321  struct ath_txq *txq, int retry_tx);
322 void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq);
323 int ath_tx_init(struct ath_softc *sc, int nbufs);
324 void ath_tx_cleanup(struct ath_softc *sc);
325 int ath_txq_update(struct ath_softc *sc, int qnum,
326  struct ath9k_tx_queue_info *q);
327 int ath_tx_start(struct net80211_device *dev, struct io_buffer *iob,
328  struct ath_tx_control *txctl);
329 void ath_tx_tasklet(struct ath_softc *sc);
330 
331 /*******/
332 /* ANI */
333 /*******/
334 
335 #define ATH_STA_SHORT_CALINTERVAL 1000 /* 1 second */
336 #define ATH_AP_SHORT_CALINTERVAL 100 /* 100 ms */
337 #define ATH_ANI_POLLINTERVAL_OLD 100 /* 100 ms */
338 #define ATH_ANI_POLLINTERVAL_NEW 1000 /* 1000 ms */
339 #define ATH_LONG_CALINTERVAL_INT 1000 /* 1000 ms */
340 #define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
341 #define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */
342 
343 void ath_hw_pll_work(struct ath_softc *sc);
344 void ath_ani_calibrate(struct ath_softc *sc);
345 
346 /********************/
347 /* Main driver core */
348 /********************/
349 
350 /*
351  * Default cache line size, in bytes.
352  * Used when PCI device not fully initialized by bootrom/BIOS
353 */
354 #define DEFAULT_CACHELINE 32
355 #define ATH_REGCLASSIDS_MAX 10
356 #define ATH_CABQ_READY_TIME 80 /* % of beacon interval */
357 #define ATH_MAX_SW_RETRIES 10
358 #define ATH_CHAN_MAX 255
359 
360 #define ATH_TXPOWER_MAX 100 /* .5 dBm units */
361 #define ATH_RATE_DUMMY_MARKER 0
362 
363 #define SC_OP_INVALID BIT(0)
364 #define SC_OP_BEACONS BIT(1)
365 #define SC_OP_RXAGGR BIT(2)
366 #define SC_OP_TXAGGR BIT(3)
367 #define SC_OP_OFFCHANNEL BIT(4)
368 #define SC_OP_PREAMBLE_SHORT BIT(5)
369 #define SC_OP_PROTECT_ENABLE BIT(6)
370 #define SC_OP_RXFLUSH BIT(7)
371 #define SC_OP_LED_ASSOCIATED BIT(8)
372 #define SC_OP_LED_ON BIT(9)
373 #define SC_OP_TSF_RESET BIT(11)
374 #define SC_OP_BT_PRIORITY_DETECTED BIT(12)
375 #define SC_OP_BT_SCAN BIT(13)
376 #define SC_OP_ANI_RUN BIT(14)
377 #define SC_OP_ENABLE_APM BIT(15)
378 #define SC_OP_PRIM_STA_VIF BIT(16)
379 
380 /* Powersave flags */
381 #define PS_WAIT_FOR_BEACON BIT(0)
382 #define PS_WAIT_FOR_CAB BIT(1)
383 #define PS_WAIT_FOR_PSPOLL_DATA BIT(2)
384 #define PS_WAIT_FOR_TX_ACK BIT(3)
385 #define PS_BEACON_SYNC BIT(4)
386 #define PS_TSFOOR_SYNC BIT(5)
387 
388 struct ath_rate_table;
389 
395 };
396 
401 
402  /* rate index is an MCS rate number instead of an index */
408 };
409 
410 struct survey_info {
419 };
420 
429 };
430 
432  const u8 *hw_macaddr; /* phy's hardware address, set
433  * before starting iteration for
434  * valid bssid mask.
435  */
436  u8 mask[ETH_ALEN]; /* bssid mask */
437  int naps; /* number of AP vifs */
438  int nmeshes; /* number of mesh vifs */
439  int nstations; /* number of station vifs */
440  int nwds; /* number of nwd vifs */
441  int nadhocs; /* number of adhoc vifs */
442  int nothers; /* number of vifs not specified above. */
443 };
444 
445 struct ath_softc {
447  struct pci_device *pdev;
448 
449  int chan_idx;
453 
454  void (*intr_tq)(struct ath_softc *sc);
455  struct ath_hw *sc_ah;
456  void *mem;
457  int irq;
458 
459  void (*paprd_work)(struct ath_softc *sc);
460  void (*hw_check_work)(struct ath_softc *sc);
461  void (*paprd_complete)(struct ath_softc *sc);
462 
463  unsigned int hw_busy_count;
464 
466  u32 sc_flags; /* SC_OP_* */
467  u16 ps_flags; /* PS_* */
470  int ps_idle;
471  short nbcnvifs;
472  short nvifs;
473  unsigned long ps_usecount;
474 
476  struct ath_rx rx;
477  struct ath_tx tx;
480  int hw_rix;
481 
484 
485  void (*tx_complete_work)(struct ath_softc *sc);
486  unsigned long tx_complete_work_timer;
487  void (*hw_pll_work)(struct ath_softc *sc);
488  unsigned long hw_pll_work_timer;
489 
491 };
492 
493 void ath9k_tasklet(struct ath_softc *sc);
494 int ath_reset(struct ath_softc *sc, int retry_tx);
495 
496 static inline void ath_read_cachesize(struct ath_common *common, int *csz)
497 {
498  common->bus_ops->read_cachesize(common, csz);
499 }
500 
502 extern int ath9k_modparam_nohwcrypt;
503 extern int is_ath9k_unloaded;
504 
505 void ath_isr(struct net80211_device *dev);
506 void ath9k_init_crypto(struct ath_softc *sc);
507 int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
508  const struct ath_bus_ops *bus_ops);
509 void ath9k_deinit_device(struct ath_softc *sc);
510 void ath9k_set_hw_capab(struct ath_softc *sc, struct net80211_device *dev);
511 int ath_set_channel(struct ath_softc *sc, struct net80211_device *dev,
512  struct ath9k_channel *hchan);
513 
514 void ath_radio_enable(struct ath_softc *sc, struct net80211_device *dev);
515 void ath_radio_disable(struct ath_softc *sc, struct net80211_device *dev);
516 int ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode);
517 int ath9k_uses_beacons(int type);
518 
519 u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate);
520 
521 void ath_start_rfkill_poll(struct ath_softc *sc);
522 extern void ath9k_rfkill_poll_state(struct net80211_device *dev);
523 
524 #endif /* ATH9K_H */
uint16_t u16
Definition: stdint.h:22
int ath9k_modparam_nohwcrypt
int8_t s8
Definition: stdint.h:19
@txq_map: Index is mac80211 queue number.
Definition: ath9k.h:282
u16 maxampdu
Definition: ath9k.h:256
struct ath_descdma txdma
Definition: ath9k.h:287
void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head)
const char * name
Definition: ath9k_hw.c:1986
s8 noise
Definition: ath9k.h:418
struct io_buffer * bf_mpdu
Definition: ath9k.h:225
u16 hw_value_short
Definition: ath9k.h:394
Definition: hw.h:657
u64 channel_time
Definition: ath9k.h:412
struct list_head buf_q
Definition: ath9k.h:236
struct ath_atx_ac ac[WME_NUM_AC]
Definition: ath9k.h:253
unsigned long tx_complete_work_timer
Definition: ath9k.h:486
int framelen
Definition: ath9k.h:207
void * bf_desc
Definition: ath9k.h:226
struct ath_atx_tid tid[WME_NUM_TID]
Definition: ath9k.h:252
int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp)
Definition: ath9k_recv.c:432
int ps_idle
Definition: ath9k.h:470
void ath_tx_tasklet(struct ath_softc *sc)
Definition: ath9k_xmit.c:773
int pending_frames
Definition: ath9k.h:195
struct survey_info * cur_survey
Definition: ath9k.h:451
u8 txq_headidx
Definition: ath9k.h:193
unsigned long ps_usecount
Definition: ath9k.h:473
void(* paprd_complete)(struct ath_softc *sc)
Definition: ath9k.h:461
int irq
Definition: ath9k.h:457
ATH_AGGR_STATUS
Definition: ath9k.h:174
struct ath_buf_state bf_state
Definition: ath9k.h:231
survey_info_flags
Definition: ath9k.h:421
u16 ps_flags
Definition: ath9k.h:467
u8 mpdudensity
Definition: ath9k.h:257
int ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode)
Definition: ath9k_main.c:28
short nvifs
Definition: ath9k.h:472
u64 channel_time_rx
Definition: ath9k.h:415
struct ath_buf * rx_bufptr
Definition: ath9k.h:304
void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
Definition: ath9k_xmit.c:257
struct ath_txq * txq
Definition: ath9k.h:199
unsigned int rxfilter
Definition: ath9k.h:301
uint16_t mode
Acceleration mode.
Definition: ena.h:26
void ath9k_tasklet(struct ath_softc *sc)
Definition: ath9k_main.c:341
uint32_t type
Operating system type.
Definition: ena.h:12
int paused
Definition: ath9k.h:247
int stopped
Definition: ath9k.h:188
u32 * axq_link
Definition: ath9k.h:184
struct ath_descdma rxdma
Definition: ath9k.h:303
int mac80211_qnum
Definition: ath9k.h:182
struct ath_txq * txq
Definition: ath9k.h:267
void ath9k_rfkill_poll_state(struct net80211_device *dev)
u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
Definition: ath9k_xmit.c:411
void(* hw_check_work)(struct ath_softc *sc)
Definition: ath9k.h:460
void ath_tx_cleanup(struct ath_softc *sc)
Definition: ath9k_xmit.c:811
u16 seq_start
Definition: ath9k.h:240
int is_ath9k_unloaded
Definition: ath9k_init.c:30
u32 ath_calcrxfilter(struct ath_softc *sc)
Definition: ath9k_recv.c:181
#define ATH9K_NUM_CHANNELS
Definition: hw.h:75
void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, int retry_tx)
Definition: ath9k_xmit.c:183
struct net80211_channel * channel
Definition: ath9k.h:411
int ath_tx_start(struct net80211_device *dev, struct io_buffer *iob, struct ath_tx_control *txctl)
Definition: ath9k_xmit.c:571
u8 txq_tailidx
Definition: ath9k.h:194
u8 state
Definition: ath9k.h:248
void ath9k_set_hw_capab(struct ath_softc *sc, struct net80211_device *dev)
struct ath_txq txq[ATH9K_NUM_TX_QUEUES]
Definition: ath9k.h:286
uint8_t head
Head number.
Definition: int13.h:34
u8 bfs_paprd
Definition: ath9k.h:216
short nbcnvifs
Definition: ath9k.h:471
struct list_head axq_q
Definition: ath9k.h:185
int ath_drain_all_txq(struct ath_softc *sc, int retry_tx)
Definition: ath9k_xmit.c:218
A doubly-linked list entry (or list head)
Definition: list.h:19
int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head, const char *name, int nbuf, int ndesc, int is_tx)
Definition: ath9k_init.c:181
int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_tx_queue_info *q)
u64 channel_time_busy
Definition: ath9k.h:413
u32 axq_ampdu_depth
Definition: ath9k.h:187
u32 bf_daddr
Definition: ath9k.h:227
buffer_type
enum buffer_type - Buffer type flags
Definition: ath9k.h:94
struct net80211_device * dev
Definition: ath9k.h:446
void ath_radio_enable(struct ath_softc *sc, struct net80211_device *dev)
Operations that must be implemented by an 802.11 driver.
Definition: net80211.h:293
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
u16 bf_flags
Definition: ath9k.h:230
u8 rxotherant
Definition: ath9k.h:299
int sched
Definition: ath9k.h:246
#define ATH_TID_MAX_BUFS
Definition: common.h:33
Definition: ath9k.h:181
static void ath_read_cachesize(struct ath_common *common, int *csz)
Definition: ath9k.h:496
int ath9k_uses_beacons(int type)
void(* paprd_work)(struct ath_softc *sc)
Definition: ath9k.h:459
#define WME_NUM_TID
Definition: common.h:30
void(* tx_complete_work)(struct ath_softc *sc)
Definition: ath9k.h:485
Information on the capabilities of an 802.11 hardware device.
Definition: net80211.h:436
u32 txqsetup
Definition: ath9k.h:284
int bf_stale
Definition: ath9k.h:229
ath9k_key_type
Definition: mac.h:665
struct ath_hw * sc_ah
Definition: ath9k.h:455
ath9k_power_mode
Definition: hw.h:379
unsigned long bfs_paprd_timestamp
Definition: ath9k.h:217
struct ath_config config
Definition: ath9k.h:475
u16 seq_next
Definition: ath9k.h:241
#define BITS_TO_LONGS(nr)
Definition: ath.h:33
uint64_t u64
Definition: stdint.h:26
struct list_head rxbuf
Definition: ath9k.h:302
struct net80211_device_operations ath9k_ops
Definition: ath9k_main.c:911
u8 defant
Definition: ath9k.h:298
void(* hw_pll_work)(struct ath_softc *sc)
Definition: ath9k.h:487
u32 bf_buf_addr
Definition: ath9k.h:228
int last_rssi
Definition: ath9k.h:483
int baw_tail
Definition: ath9k.h:245
u64 channel_time_ext_busy
Definition: ath9k.h:414
struct list_head list
Definition: ath9k.h:201
Definition: ath9k.h:220
u8 bf_type
Definition: ath9k.h:215
u32 dd_desc_paddr
Definition: ath9k.h:108
int sleeping
Definition: ath9k.h:259
#define ATH_TXFIFO_DEPTH
Definition: ath9k.h:180
u32 filled
Definition: ath9k.h:417
u8 mask[ETH_ALEN]
Definition: ath9k.h:436
void ath9k_init_crypto(struct ath_softc *sc)
Definition: ath9k_init.c:276
struct list_head txq_fifo[ATH_TXFIFO_DEPTH]
Definition: ath9k.h:191
struct ath_rx rx
Definition: ath9k.h:476
uint8_t subtype
Slow protocols subtype.
Definition: eth_slow.h:13
A PCI device.
Definition: pci.h:211
struct io_buffer * frag
Definition: ath9k.h:307
Structure encapsulating the complete state of an 802.11 device.
Definition: net80211.h:786
struct ath_buf * bf_lastbf
Definition: ath9k.h:222
struct list_head list
Definition: ath9k.h:221
u32 axq_qnum
Definition: ath9k.h:183
u32 * rxlink
Definition: ath9k.h:300
An 802.11 RF channel.
Definition: net80211.h:385
#define ATH9K_NUM_TX_QUEUES
Definition: mac.h:581
int ath_set_channel(struct ath_softc *sc, struct net80211_device *dev, struct ath9k_channel *hchan)
Definition: ath9k_main.c:118
int hw_rix
Definition: ath9k.h:480
void ath_start_rfkill_poll(struct ath_softc *sc)
u16 curtxpow
Definition: ath9k.h:468
struct ath_tx tx
Definition: ath9k.h:477
FILE_SECBOOT(FORBIDDEN)
u8 cabqReadytime
Definition: ath9k.h:67
#define WME_NUM_AC
Definition: common.h:36
struct net80211_hw_info * hwinfo
Definition: ath9k.h:478
unsigned int hw_busy_count
Definition: ath9k.h:463
#define ETH_ALEN
Definition: if_ether.h:9
struct list_head list
Definition: ath9k.h:235
int ps_key
Definition: ath9k.h:254
int ath_reset(struct ath_softc *sc, int retry_tx)
Definition: ath9k_main.c:513
struct ib_cm_common common
Definition: ib_mad.h:12
int clear_ps_filter
Definition: ath9k.h:203
struct ath_node * an
Definition: ath9k.h:237
int sched
Definition: ath9k.h:200
u32 sc_flags
Definition: ath9k.h:466
u16 seq_no
Definition: ath9k.h:283
unsigned long hw_pll_work_timer
Definition: ath9k.h:488
struct pci_device * pdev
Definition: ath9k.h:447
u16 baw_size
Definition: ath9k.h:242
void ath_rx_cleanup(struct ath_softc *sc)
Definition: ath9k_recv.c:144
void ath9k_deinit_device(struct ath_softc *sc)
Definition: ath9k_init.c:578
struct list_head rx_fifo
Definition: ath9k.h:292
int chan_is_ht
Definition: ath9k.h:450
Definition: ath9k.h:96
struct list_head axq_acq
Definition: ath9k.h:190
enum ath9k_key_type keytype
Definition: ath9k.h:209
const u8 * hw_macaddr
Definition: ath9k.h:432
#define BIT(nr)
Definition: ath.h:34
struct ath_node * an
Definition: ath9k.h:268
int ath_startrecv(struct ath_softc *sc)
Definition: ath9k_recv.c:196
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops)
Definition: ath9k_init.c:487
int baw_head
Definition: ath9k.h:244
#define NET80211_MAX_RATES
The maximum number of TX rates we allow to be configured simultaneously.
Definition: net80211.h:272
struct list_head rx_buffers
Definition: ath9k.h:293
u32 axq_depth
Definition: ath9k.h:186
struct list_head txbuf
Definition: ath9k.h:285
ath9k_rate_control_flags
Definition: ath9k.h:397
int ps_enabled
Definition: ath9k.h:469
u64 channel_time_tx
Definition: ath9k.h:416
struct ath9k_hw_cal_data caldata
Definition: ath9k.h:482
void ath_ani_calibrate(struct ath_softc *sc)
Definition: ath9k_main.c:202
void ath_flushrecv(struct ath_softc *sc)
Definition: ath9k_recv.c:244
u32 rx_fifo_hwsize
Definition: ath9k.h:294
int ath_tx_init(struct ath_softc *sc, int nbufs)
Definition: ath9k_xmit.c:790
unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)]
Definition: ath9k.h:239
u32 intrstatus
Definition: ath9k.h:465
void ath_hw_pll_work(struct ath_softc *sc)
Definition: ath9k_main.c:327
FILE_LICENCE(BSD2)
void * mem
Definition: ath9k.h:456
struct survey_info survey[ATH9K_NUM_CHANNELS]
Definition: ath9k.h:452
void(* intr_tq)(struct ath_softc *sc)
Definition: ath9k.h:454
u16 txpowlimit
Definition: ath9k.h:66
int tidno
Definition: ath9k.h:243
struct list_head txq_fifo_pending
Definition: ath9k.h:192
int chan_idx
Definition: ath9k.h:449
struct ath9k_legacy_rate rates[NET80211_MAX_RATES]
Definition: ath9k.h:479
u32 dd_desc_len
Definition: ath9k.h:109
int ath_stoprecv(struct ath_softc *sc)
Definition: ath9k_recv.c:224
void ath_radio_disable(struct ath_softc *sc, struct net80211_device *dev)
Definition: ath9k_main.c:473
void ath_isr(struct net80211_device *dev)
Definition: ath9k_main.c:368
struct list_head tid_q
Definition: ath9k.h:202
struct ath_txq * txq_map[WME_NUM_AC]
Definition: ath9k.h:288
Definition: ath9k.h:297
int ath_rx_init(struct ath_softc *sc, int nbufs)
Definition: ath9k_recv.c:99
struct ath_txq * ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
Definition: ath9k_xmit.c:108
struct ath_descdma txsdma
Definition: ath9k.h:490
uint8_t u8
Definition: stdint.h:20
uint32_t u32
Definition: stdint.h:24
struct ath_buf * dd_bufptr
Definition: ath9k.h:110
struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]
Definition: ath9k.h:305
struct ath_buf * bf_next
Definition: ath9k.h:224
void * dd_desc
Definition: ath9k.h:107
int axq_tx_inprogress
Definition: ath9k.h:189
struct ath_atx_ac * ac
Definition: ath9k.h:238
A persistent I/O buffer.
Definition: iobuf.h:38