iPXE
ath9k_recv.c
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
20FILE_SECBOOT ( FORBIDDEN );
21
22#include <ipxe/io.h>
23
24#include "ath9k.h"
25#include "ar9003_mac.h"
26
27/*
28 * Setup and link descriptors.
29 *
30 * 11N: we can no longer afford to self link the last descriptor.
31 * MAC acknowledges BA status as long as it copies frames to host
32 * buffer (or rx fifo). This can incorrectly acknowledge packets
33 * to a sender if last desc is self-linked.
34 */
35static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)
36{
37 struct ath_hw *ah = sc->sc_ah;
39 struct ath_desc *ds;
40// struct io_buffer *iob;
41
43
44 ds = bf->bf_desc;
45 ds->ds_link = 0; /* link to null */
46 ds->ds_data = bf->bf_buf_addr;
47
48// /* virtual addr of the beginning of the buffer. */
49// iob = bf->bf_mpdu;
50// ds->ds_vdata = iob->data;
51
52 /*
53 * setup rx descriptors. The rx_bufsize here tells the hardware
54 * how much data it can DMA to us and that we are prepared
55 * to process
56 */
58 common->rx_bufsize,
59 0);
60
61 if (sc->rx.rxlink == NULL)
63 else
64 *sc->rx.rxlink = bf->bf_daddr;
65
66 sc->rx.rxlink = &ds->ds_link;
67}
68
69static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
70{
71 /* XXX block beacon interrupts */
72 ath9k_hw_setantenna(sc->sc_ah, antenna);
73 sc->rx.defant = antenna;
74 sc->rx.rxotherant = 0;
75}
76
77static void ath_opmode_init(struct ath_softc *sc)
78{
79 struct ath_hw *ah = sc->sc_ah;
81
82 u32 rfilt, mfilt[2];
83
84 /* configure rx filter */
85 rfilt = ath_calcrxfilter(sc);
87
88 /* configure bssid mask */
90
91 /* configure operational mode */
93
94 /* calculate and install multicast filter */
95 mfilt[0] = mfilt[1] = ~0;
96 ath9k_hw_setmcastfilter(ah, mfilt[0], mfilt[1]);
97}
98
99int ath_rx_init(struct ath_softc *sc, int nbufs)
100{
101 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
102 struct io_buffer *iob;
103 struct ath_buf *bf;
104 int error = 0;
105
107
108 common->rx_bufsize = IEEE80211_MAX_MPDU_LEN / 2 +
110
111 DBG2("ath9k: cachelsz %d rxbufsize %d\n",
112 common->cachelsz, common->rx_bufsize);
113
114 /* Initialize rx descriptors */
115
116 error = ath_descdma_setup(sc, &sc->rx.rxdma, &sc->rx.rxbuf,
117 "rx", nbufs, 1, 0);
118 if (error != 0) {
119 DBG("ath9k: "
120 "failed to allocate rx descriptors: %d\n",
121 error);
122 goto err;
123 }
124
125 list_for_each_entry(bf, &sc->rx.rxbuf, list) {
126 iob = alloc_iob_raw ( common->rx_bufsize, common->cachelsz, 0 );
127 if (iob == NULL) {
128 error = -ENOMEM;
129 goto err;
130 }
131
132 bf->bf_mpdu = iob;
133 bf->bf_buf_addr = virt_to_bus ( iob->data );
134 }
135 sc->rx.rxlink = NULL;
136
137err:
138 if (error)
139 ath_rx_cleanup(sc);
140
141 return error;
142}
143
144void ath_rx_cleanup(struct ath_softc *sc)
145{
146 struct io_buffer *iob;
147 struct ath_buf *bf;
148
149 list_for_each_entry(bf, &sc->rx.rxbuf, list) {
150 iob = bf->bf_mpdu;
151 if (iob) {
152 free_iob(iob);
153 bf->bf_buf_addr = 0;
154 bf->bf_mpdu = NULL;
155 }
156 }
157
158 if (sc->rx.rxdma.dd_desc_len != 0)
159 ath_descdma_cleanup(sc, &sc->rx.rxdma, &sc->rx.rxbuf);
160}
161
162/*
163 * Calculate the receive filter according to the
164 * operating mode and state:
165 *
166 * o always accept unicast, broadcast, and multicast traffic
167 * o maintain current state of phy error reception (the hal
168 * may enable phy error frames for noise immunity work)
169 * o probe request frames are accepted only when operating in
170 * hostap, adhoc, or monitor modes
171 * o enable promiscuous mode according to the interface state
172 * o accept beacons:
173 * - when operating in adhoc mode so the 802.11 layer creates
174 * node table entries for peers,
175 * - when operating in station mode for collecting rssi data when
176 * the station is otherwise quiet, or
177 * - when operating as a repeater so we see repeater-sta beacons
178 * - when scanning
179 */
180
182{
183#define RX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR)
184
185 u32 rfilt;
186
190
191 return rfilt;
192
193#undef RX_FILTER_PRESERVE
194}
195
197{
198 struct ath_hw *ah = sc->sc_ah;
199 struct ath_buf *bf, *tbf;
200
201 if (list_empty(&sc->rx.rxbuf))
202 goto start_recv;
203
204 sc->rx.rxlink = NULL;
205 list_for_each_entry_safe(bf, tbf, &sc->rx.rxbuf, list) {
206 ath_rx_buf_link(sc, bf);
207 }
208
209 /* We could have deleted elements so the list may be empty now */
210 if (list_empty(&sc->rx.rxbuf))
211 goto start_recv;
212
213 bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
216
217start_recv:
218 ath_opmode_init(sc);
220
221 return 0;
222}
223
224int ath_stoprecv(struct ath_softc *sc)
225{
226 struct ath_hw *ah = sc->sc_ah;
227 int stopped, reset = 0;
228
231 stopped = ath9k_hw_stopdmarecv(ah, &reset);
232
233 sc->rx.rxlink = NULL;
234
235 if (!(ah->ah_flags & AH_UNPLUGGED) &&
236 !stopped) {
237 DBG("ath9k: "
238 "Could not stop RX, we could be "
239 "confusing the DMA engine when we start RX up\n");
240 }
241 return stopped && !reset;
242}
243
244void ath_flushrecv(struct ath_softc *sc)
245{
246 sc->sc_flags |= SC_OP_RXFLUSH;
247 ath_rx_tasklet(sc, 1, 0);
249}
250
251static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc,
252 struct ath_rx_status *rs)
253{
254 struct ath_hw *ah = sc->sc_ah;
255 struct ath_desc *ds;
256 struct ath_buf *bf;
257 int ret;
258
259 if (list_empty(&sc->rx.rxbuf)) {
260 sc->rx.rxlink = NULL;
261 return NULL;
262 }
263
264 bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
265 ds = bf->bf_desc;
266
267 /*
268 * Must provide the virtual address of the current
269 * descriptor, the physical address, and the virtual
270 * address of the next descriptor in the h/w chain.
271 * This allows the HAL to look ahead to see if the
272 * hardware is done with a descriptor by checking the
273 * done bit in the following descriptor and the address
274 * of the current descriptor the DMA engine is working
275 * on. All this is necessary because of our use of
276 * a self-linked list to avoid rx overruns.
277 */
278 ret = ath9k_hw_rxprocdesc(ah, ds, rs, 0);
279 if (ret == -EINPROGRESS) {
280 struct ath_rx_status trs;
281 struct ath_buf *tbf;
282 struct ath_desc *tds;
283
284 memset(&trs, 0, sizeof(trs));
285 if ((&bf->list)->next == &sc->rx.rxbuf) {
286 sc->rx.rxlink = NULL;
287 return NULL;
288 }
289
290 tbf = list_entry(bf->list.next, struct ath_buf, list);
291
292 /*
293 * On some hardware the descriptor status words could
294 * get corrupted, including the done bit. Because of
295 * this, check if the next descriptor's done bit is
296 * set or not.
297 *
298 * If the next descriptor's done bit is set, the current
299 * descriptor has been corrupted. Force s/w to discard
300 * this descriptor and continue...
301 */
302
303 tds = tbf->bf_desc;
304 ret = ath9k_hw_rxprocdesc(ah, tds, &trs, 0);
305 if (ret == -EINPROGRESS)
306 return NULL;
307 }
308
309 if (!bf->bf_mpdu)
310 return bf;
311
312 return bf;
313}
314
315/* Assumes you've already done the endian to CPU conversion */
317 struct ath_rx_status *rx_stats,
318 int *decrypt_error)
319{
320 struct ath_hw *ah = common->ah;
321 u8 rx_status_len = ah->caps.rx_status_len;
322
323
324 if (!rx_stats->rs_datalen)
325 return 0;
326 /*
327 * rs_status follows rs_datalen so if rs_datalen is too large
328 * we can take a hint that hardware corrupted it, so ignore
329 * those frames.
330 */
331 if (rx_stats->rs_datalen > (common->rx_bufsize - rx_status_len))
332 return 0;
333
334 /* Only use error bits from the last fragment */
335 if (rx_stats->rs_more)
336 return 1;
337
338 /*
339 * The rx_stats->rs_status will not be set until the end of the
340 * chained descriptors so it can be ignored if rs_more is set. The
341 * rs_more will be false at the last element of the chained
342 * descriptors.
343 */
344 if (rx_stats->rs_status != 0) {
345 if (rx_stats->rs_status & ATH9K_RXERR_PHY)
346 return 0;
347
348 if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
349 *decrypt_error = 1;
350 }
351 /*
352 * Reject error frames with the exception of
353 * decryption and MIC failures. For monitor mode,
354 * we also ignore the CRC error.
355 */
356 if (ah->is_monitoring) {
357 if (rx_stats->rs_status &
360 return 0;
361 } else {
362 if (rx_stats->rs_status &
364 return 0;
365 }
366 }
367 }
368 return 1;
369}
370
372 struct net80211_device *dev,
373 struct ath_rx_status *rx_stats,
374 int *rix)
375{
376 struct ath_softc *sc = (struct ath_softc *)dev->priv;
377 int band;
378 int i = 0;
379
380 band = (dev->channels + sc->dev->channel)->band;
381
382 for (i = 0; i < sc->hwinfo->nr_rates[band]; i++) {
383 if (sc->rates[i].hw_value == rx_stats->rs_rate) {
384 *rix = i;
385 return 0;
386 }
387 if (sc->rates[i].hw_value_short == rx_stats->rs_rate) {
388 *rix = i;
389 return 0;
390 }
391 }
392
393 /*
394 * No valid hardware bitrate found -- we should not get here
395 * because hardware has already validated this frame as OK.
396 */
397 DBG("ath9k: "
398 "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
399 rx_stats->rs_rate);
400
401 return -EINVAL;
402}
403
404/*
405 * For Decrypt or Demic errors, we only mark packet status here and always push
406 * up the frame up to let mac80211 handle the actual error case, be it no
407 * decryption key or real decryption error. This let us keep statistics there.
408 */
410 struct net80211_device *dev,
411 struct ath_rx_status *rx_stats,
412 int *rix,
413 int *decrypt_error)
414{
415 /*
416 * everything but the rate is checked here, the rate check is done
417 * separately to avoid doing two lookups for a rate for each frame.
418 */
419 if (!ath9k_rx_accept(common, rx_stats, decrypt_error))
420 return -EINVAL;
421
422 /* Only use status info from the last fragment */
423 if (rx_stats->rs_more)
424 return 0;
425
426 if (ath9k_process_rate(common, dev, rx_stats, rix))
427 return -EINVAL;
428
429 return 0;
430}
431
432int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp __unused)
433{
434 struct ath_buf *bf;
435 struct io_buffer *iob = NULL, *requeue_iob;
436 struct ath_hw *ah = sc->sc_ah;
438 /*
439 * The hw can technically differ from common->hw when using ath9k
440 * virtual wiphy so to account for that we iterate over the active
441 * wiphys and find the appropriate wiphy and therefore hw.
442 */
443 struct net80211_device *dev = sc->dev;
444 int retval;
445 int decrypt_error = 0;
446 struct ath_rx_status rs;
447 int rix = 0;
448
449 do {
450 /* If handling rx interrupt and flush is in progress => exit */
451 if ((sc->sc_flags & SC_OP_RXFLUSH) && (flush == 0))
452 break;
453
454 memset(&rs, 0, sizeof(rs));
455 bf = ath_get_next_rx_buf(sc, &rs);
456
457 if (!bf)
458 break;
459
460 iob = bf->bf_mpdu;
461 if (!iob)
462 continue;
463
464 /*
465 * If we're asked to flush receive queue, directly
466 * chain it back at the queue without processing it.
467 */
468 if (flush)
469 goto requeue_drop_frag;
470
472 &rix, &decrypt_error);
473 if (retval)
474 goto requeue_drop_frag;
475
476 /* Ensure we always have an iob to requeue once we are done
477 * processing the current buffer's iob */
478 requeue_iob = alloc_iob_raw ( common->rx_bufsize,
479 common->cachelsz, 0 );
480
481 /* If there is no memory we ignore the current RX'd frame,
482 * tell hardware it can give us a new frame using the old
483 * iob and put it at the tail of the sc->rx.rxbuf list for
484 * processing. */
485 if (!requeue_iob)
486 goto requeue_drop_frag;
487
488 iob_put(iob, rs.rs_datalen + ah->caps.rx_status_len);
489 if (ah->caps.rx_status_len)
490 iob_pull(iob, ah->caps.rx_status_len);
491
492 /* We will now give hardware our shiny new allocated iob */
493 bf->bf_mpdu = requeue_iob;
494 bf->bf_buf_addr = virt_to_bus ( requeue_iob->data );
495
496 /*
497 * change the default rx antenna if rx diversity chooses the
498 * other antenna 3 times in a row.
499 */
500 if (sc->rx.defant != rs.rs_antenna) {
501 if (++sc->rx.rxotherant >= 3)
503 } else {
504 sc->rx.rxotherant = 0;
505 }
506
507 DBGIO("ath9k: rx %d bytes, signal %d, bitrate %d, hw_value %d\n", rs.rs_datalen,
508 rs.rs_rssi, sc->rates[rix].bitrate, rs.rs_rate);
509
510 net80211_rx(dev, iob, rs.rs_rssi,
511 sc->rates[rix].bitrate);
512
513requeue_drop_frag:
514 list_del(&bf->list);
515 list_add_tail(&bf->list, &sc->rx.rxbuf);
516 ath_rx_buf_link(sc, bf);
518 } while (1);
519
520 return 0;
521}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
struct arbelprm_completion_with_error error
Definition arbel.h:1
unsigned long retval
Definition xen.h:46
#define SC_OP_RXFLUSH
Definition ath9k.h:370
void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head)
#define IEEE80211_MAX_MPDU_LEN
Definition ath9k.h:149
#define SC_OP_OFFCHANNEL
Definition ath9k.h:367
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
#define ATH_RXBUF_RESET(_bf)
Definition ath9k.h:82
void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, u32 size, u32 flags)
void ath9k_hw_setopmode(struct ath_hw *ah)
Definition ath9k_hw.c:1955
void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1)
Definition ath9k_hw.c:1960
void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna)
Definition ath9k_hw.c:1873
void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
Definition ath9k_hw.c:1895
u32 ath9k_hw_getrxfilter(struct ath_hw *ah)
Definition ath9k_hw.c:1882
void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp)
Definition ath9k_mac.c:521
void ath9k_hw_abortpcurecv(struct ath_hw *ah)
Definition ath9k_mac.c:533
int ath9k_hw_stopdmarecv(struct ath_hw *ah, int *reset)
Definition ath9k_mac.c:538
int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, struct ath_rx_status *rs, u64 tsf __unused)
Definition ath9k_mac.c:396
void ath9k_hw_startpcureceive(struct ath_hw *ah, int is_scanning)
Definition ath9k_mac.c:526
#define RX_FILTER_PRESERVE
u32 ath_calcrxfilter(struct ath_softc *sc)
Definition ath9k_recv.c:181
static int ath9k_process_rate(struct ath_common *common __unused, struct net80211_device *dev, struct ath_rx_status *rx_stats, int *rix)
Definition ath9k_recv.c:371
static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)
Definition ath9k_recv.c:35
int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp __unused)
Definition ath9k_recv.c:432
int ath_stoprecv(struct ath_softc *sc)
Definition ath9k_recv.c:224
static void ath_opmode_init(struct ath_softc *sc)
Definition ath9k_recv.c:77
int ath_rx_init(struct ath_softc *sc, int nbufs)
Definition ath9k_recv.c:99
static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
Definition ath9k_recv.c:69
static struct ath_buf * ath_get_next_rx_buf(struct ath_softc *sc, struct ath_rx_status *rs)
Definition ath9k_recv.c:251
static int ath9k_rx_iob_preprocess(struct ath_common *common, struct net80211_device *dev, struct ath_rx_status *rx_stats, int *rix, int *decrypt_error)
Definition ath9k_recv.c:409
static int ath9k_rx_accept(struct ath_common *common, struct ath_rx_status *rx_stats, int *decrypt_error)
Definition ath9k_recv.c:316
void ath_rx_cleanup(struct ath_softc *sc)
Definition ath9k_recv.c:144
void ath_flushrecv(struct ath_softc *sc)
Definition ath9k_recv.c:244
int ath_startrecv(struct ath_softc *sc)
Definition ath9k_recv.c:196
void ath_hw_setbssidmask(struct ath_common *common)
ath_hw_set_bssid_mask - filter out bssids we listen
Definition ath_hw.c:122
#define __unused
Declare a variable or data structure as unused.
Definition compiler.h:573
#define DBG2(...)
Definition compiler.h:515
#define DBGIO(...)
Definition compiler.h:549
#define DBG(...)
Print a debugging message.
Definition compiler.h:498
void net80211_rx(struct net80211_device *dev, struct io_buffer *iob, int signal, u16 rate)
Handle receipt of 802.11 frame.
Definition net80211.c:2690
#define EINVAL
Invalid argument.
Definition errno.h:429
#define ENOMEM
Not enough space.
Definition errno.h:535
#define EINPROGRESS
Operation in progress.
Definition errno.h:419
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
static void ath9k_hw_rxena(struct ath_hw *ah)
Definition hw-ops.h:34
#define AH_UNPLUGGED
Definition hw.h:655
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
Definition hw.h:870
struct ib_cm_common common
Definition ib_mad.h:0
#define u8
Definition igbvf_osdep.h:40
iPXE I/O API
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition io.h:184
void * memset(void *dest, int character, size_t len) __nonnull
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
Definition iobuf.c:153
struct io_buffer * alloc_iob_raw(size_t len, size_t align, size_t offset)
Allocate I/O buffer with specified alignment and offset.
Definition iobuf.c:49
#define iob_put(iobuf, len)
Definition iobuf.h:125
#define iob_pull(iobuf, len)
Definition iobuf.h:107
uint32_t ds
Definition librm.h:5
#define list_first_entry(list, type, member)
Get the container of the first entry in a list.
Definition list.h:334
#define list_entry(list, type, member)
Get the container of a list entry.
Definition list.h:322
#define list_for_each_entry_safe(pos, tmp, head, member)
Iterate over entries in a list, safe against deletion of the current entry.
Definition list.h:459
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
Definition list.h:94
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
Definition list.h:432
#define list_del(list)
Delete an entry from a list.
Definition list.h:120
#define list_empty(list)
Test whether a list is empty.
Definition list.h:137
#define ATH9K_RXERR_DECRYPT
Definition mac.h:193
#define ATH9K_RXERR_MIC
Definition mac.h:194
@ ATH9K_RX_FILTER_BCAST
Definition mac.h:637
@ ATH9K_RX_FILTER_MCAST
Definition mac.h:636
@ ATH9K_RX_FILTER_UCAST
Definition mac.h:635
@ ATH9K_RX_FILTER_BEACON
Definition mac.h:639
#define ATH9K_RXERR_CRC
Definition mac.h:190
#define ATH9K_RXERR_PHY
Definition mac.h:191
uint8_t ah
Definition registers.h:1
struct list_head list
Definition ath9k.h:221
void * bf_desc
Definition ath9k.h:226
struct io_buffer * bf_mpdu
Definition ath9k.h:225
u32 bf_buf_addr
Definition ath9k.h:228
u32 bf_daddr
Definition ath9k.h:227
u32 dd_desc_len
Definition ath9k.h:109
Definition hw.h:657
struct ath9k_hw_capabilities caps
Definition hw.h:664
struct net80211_device * dev
Definition hw.h:660
u8 rs_rate
Definition mac.h:144
u8 rs_more
Definition mac.h:146
u8 rs_status
Definition mac.h:140
u8 rs_antenna
Definition mac.h:145
u16 rs_datalen
Definition mac.h:139
int8_t rs_rssi
Definition mac.h:142
u8 rxotherant
Definition ath9k.h:299
struct list_head rxbuf
Definition ath9k.h:302
u32 * rxlink
Definition ath9k.h:300
struct ath_descdma rxdma
Definition ath9k.h:303
u8 defant
Definition ath9k.h:298
struct net80211_device * dev
Definition ath9k.h:446
u32 sc_flags
Definition ath9k.h:466
struct ath_rx rx
Definition ath9k.h:476
struct net80211_hw_info * hwinfo
Definition ath9k.h:478
struct ath_hw * sc_ah
Definition ath9k.h:455
struct ath9k_legacy_rate rates[NET80211_MAX_RATES]
Definition ath9k.h:479
A persistent I/O buffer.
Definition iobuf.h:38
void * data
Start of data.
Definition iobuf.h:53
struct list_head * next
Next list entry.
Definition list.h:21
Structure encapsulating the complete state of an 802.11 device.
Definition net80211.h:787
struct net80211_channel channels[NET80211_MAX_CHANNELS]
A list of all possible channels we might use.
Definition net80211.h:806
void * priv
Driver private data.
Definition net80211.h:798
u8 channel
The channel currently in use, as an index into the channels array.
Definition net80211.h:812
int nr_rates[NET80211_NR_BANDS]
Number of supported rates, indexed by band.
Definition net80211.h:511
#define u32
Definition vga.h:21