Original 20051017 tarball
[acx-mac80211.git] / wlan_hdr.h
blobe09f00b9768920aee9b401d961de2f46563f073c
1 /***********************************************************************
2 ** Copyright (C) 2003 ACX100 Open Source Project
3 **
4 ** The contents of this file are subject to the Mozilla Public
5 ** License Version 1.1 (the "License"); you may not use this file
6 ** except in compliance with the License. You may obtain a copy of
7 ** the License at http://www.mozilla.org/MPL/
8 **
9 ** Software distributed under the License is distributed on an "AS
10 ** IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 ** implied. See the License for the specific language governing
12 ** rights and limitations under the License.
14 ** Alternatively, the contents of this file may be used under the
15 ** terms of the GNU Public License version 2 (the "GPL"), in which
16 ** case the provisions of the GPL are applicable instead of the
17 ** above. If you wish to allow the use of your version of this file
18 ** only under the terms of the GPL and not to allow others to use
19 ** your version of this file under the MPL, indicate your decision
20 ** by deleting the provisions above and replace them with the notice
21 ** and other provisions required by the GPL. If you do not delete
22 ** the provisions above, a recipient may use your version of this
23 ** file under either the MPL or the GPL.
24 ** ---------------------------------------------------------------------
25 ** Inquiries regarding the ACX100 Open Source Project can be
26 ** made directly to:
28 ** acx100-users@lists.sf.net
29 ** http://acx100.sf.net
30 ** ---------------------------------------------------------------------
33 /***********************************************************************
34 ** This code is based on elements which are
35 ** Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
36 ** info@linux-wlan.com
37 ** http://www.linux-wlan.com
40 /* mini-doc
42 Here are all 11b/11g/11a rates and modulations:
44 11b 11g 11a
45 --- --- ---
46 1 |B |B |
47 2 |Q |Q |
48 5.5|Cp |C p|
49 6 | |Od |O
50 9 | |od |o
51 11 |Cp |C p|
52 12 | |Od |O
53 18 | |od |o
54 22 | | p|
55 24 | |Od |O
56 33 | | p|
57 36 | |od |o
58 48 | |od |o
59 54 | |od |o
61 Mandatory:
62 B - DBPSK (Differential Binary Phase Shift Keying)
63 Q - DQPSK (Differential Quaternary Phase Shift Keying)
64 C - CCK (Complementary Code Keying, a form of DSSS
65 (Direct Sequence Spread Spectrum) modulation)
66 O - OFDM (Orthogonal Frequency Division Multiplexing)
67 Optional:
68 o - OFDM
69 d - CCK-OFDM (also known as DSSS-OFDM)
70 p - PBCC (Packet Binary Convolutional Coding)
72 The term CCK-OFDM may be used interchangeably with DSSS-OFDM
73 (the IEEE 802.11g-2003 standard uses the latter terminology).
74 In the CCK-OFDM, the PLCP header of the frame uses the CCK form of DSSS,
75 while the PLCP payload (the MAC frame) is modulated using OFDM.
77 Basically, you must use CCK-OFDM if you have mixed 11b/11g environment,
78 or else (pure OFDM) 11b equipment may not realize that AP
79 is sending a packet and start sending its own one.
80 Sadly, looks like acx111 does not support CCK-OFDM, only pure OFDM.
82 Re PBCC: avoid using it. It makes sense only if you have
83 TI "11b+" hardware. You _must_ use PBCC in order to reach 22Mbps on it.
85 Preambles:
87 Long preamble (at 1Mbit rate, takes 144 us):
88 16 bytes ones
89 2 bytes 0xF3A0 (lsb sent first)
90 PLCP header follows (at 1Mbit also):
91 1 byte Signal: speed, in 0.1Mbit units, except for:
92 33Mbit: 33 (instead of 330 - doesn't fit in octet)
93 all CCK-OFDM rates: 30
94 1 byte Service
95 0,1,4: reserved
96 2: 1=locked clock
97 3: 1=PBCC
98 5: Length Extension (PBCC 22,33Mbit (11g only)) <-
99 6: Length Extension (PBCC 22,33Mbit (11g only)) <- BLACK MAGIC HERE
100 7: Length Extension <-
101 2 bytes Length (time needed to tx this frame)
102 a) 5.5 Mbit/s CCK
103 Length = octets*8/5.5, rounded up to integer
104 b) 11 Mbit/s CCK
105 Length = octets*8/11, rounded up to integer
106 Service bit 7:
107 0 = rounding took less than 8/11
108 1 = rounding took more than or equal to 8/11
109 c) 5.5 Mbit/s PBCC
110 Length = (octets+1)*8/5.5, rounded up to integer
111 d) 11 Mbit/s PBCC
112 Length = (octets+1)*8/11, rounded up to integer
113 Service bit 7:
114 0 = rounding took less than 8/11
115 1 = rounding took more than or equal to 8/11
116 e) 22 Mbit/s PBCC
117 Length = (octets+1)*8/22, rounded up to integer
118 Service bits 6,7:
119 00 = rounding took less than 8/22ths
120 01 = rounding took 8/22...15/22ths
121 10 = rounding took 16/22ths or more.
122 f) 33 Mbit/s PBCC
123 Length = (octets+1)*8/33, rounded up to integer
124 Service bits 5,6,7:
125 000 rounding took less than 8/33
126 001 rounding took 8/33...15/33
127 010 rounding took 16/33...23/33
128 011 rounding took 24/33...31/33
129 100 rounding took 32/33 or more
130 2 bytes CRC
132 PSDU follows (up to 2346 bytes at selected rate)
134 While Signal value alone is not enough to determine rate and modulation,
135 Signal+Service is always sufficient.
137 Short preamble (at 1Mbit rate, takes 72 us):
138 7 bytes zeroes
139 2 bytes 0x05CF (lsb sent first)
140 PLCP header follows *at 2Mbit/s*. Format is the same as in long preamble.
141 PSDU follows (up to 2346 bytes at selected rate)
143 OFDM preamble is completely different, uses OFDM
144 modulation from the start and thus easily identifiable.
145 Not shown here.
149 /***********************************************************************
150 ** Constants
153 #define WLAN_HDR_A3_LEN 24
154 #define WLAN_HDR_A4_LEN 30
155 /* IV structure:
156 ** 3 bytes: Initialization Vector (24 bits)
157 ** 1 byte: 0..5: padding, must be 0; 6..7: key selector (0-3)
159 #define WLAN_WEP_IV_LEN 4
160 /* 802.11 says 2312 but looks like 2312 is a max size of _WEPed data_ */
161 #define WLAN_DATA_MAXLEN 2304
162 #define WLAN_WEP_ICV_LEN 4
163 #define WLAN_FCS_LEN 4
164 #define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN)
165 #define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN)
166 #define WLAN_A3FR_MAXLEN_FCS (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + 4)
167 #define WLAN_A4FR_MAXLEN_FCS (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + 4)
168 #define WLAN_A3FR_MAXLEN_WEP (WLAN_A3FR_MAXLEN + 8)
169 #define WLAN_A4FR_MAXLEN_WEP (WLAN_A4FR_MAXLEN + 8)
170 #define WLAN_A3FR_MAXLEN_WEP_FCS (WLAN_A3FR_MAXLEN_FCS + 8)
171 #define WLAN_A4FR_MAXLEN_WEP_FCS (WLAN_A4FR_MAXLEN_FCS + 8)
173 #define WLAN_BSS_TS_LEN 8
174 #define WLAN_SSID_MAXLEN 32
175 #define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334)
176 #define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0)
177 #define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
178 #define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48)
179 #define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
180 #define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54)
181 #define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16)
182 #define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44)
183 #define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78)
184 #define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261)
185 #define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2)
186 #define WLAN_CHALLENGE_IE_LEN 130
187 #define WLAN_CHALLENGE_LEN 128
188 #define WLAN_WEP_MAXKEYLEN 13
189 #define WLAN_WEP_NKEYS 4
191 /*--- Frame Control Field -------------------------------------*/
192 /* Frame Types */
193 #define WLAN_FTYPE_MGMT 0x00
194 #define WLAN_FTYPE_CTL 0x01
195 #define WLAN_FTYPE_DATA 0x02
197 /* Frame subtypes */
198 /* Management */
199 #define WLAN_FSTYPE_ASSOCREQ 0x00
200 #define WLAN_FSTYPE_ASSOCRESP 0x01
201 #define WLAN_FSTYPE_REASSOCREQ 0x02
202 #define WLAN_FSTYPE_REASSOCRESP 0x03
203 #define WLAN_FSTYPE_PROBEREQ 0x04
204 #define WLAN_FSTYPE_PROBERESP 0x05
205 #define WLAN_FSTYPE_BEACON 0x08
206 #define WLAN_FSTYPE_ATIM 0x09
207 #define WLAN_FSTYPE_DISASSOC 0x0a
208 #define WLAN_FSTYPE_AUTHEN 0x0b
209 #define WLAN_FSTYPE_DEAUTHEN 0x0c
211 /* Control */
212 #define WLAN_FSTYPE_PSPOLL 0x0a
213 #define WLAN_FSTYPE_RTS 0x0b
214 #define WLAN_FSTYPE_CTS 0x0c
215 #define WLAN_FSTYPE_ACK 0x0d
216 #define WLAN_FSTYPE_CFEND 0x0e
217 #define WLAN_FSTYPE_CFENDCFACK 0x0f
219 /* Data */
220 #define WLAN_FSTYPE_DATAONLY 0x00
221 #define WLAN_FSTYPE_DATA_CFACK 0x01
222 #define WLAN_FSTYPE_DATA_CFPOLL 0x02
223 #define WLAN_FSTYPE_DATA_CFACK_CFPOLL 0x03
224 #define WLAN_FSTYPE_NULL 0x04
225 #define WLAN_FSTYPE_CFACK 0x05
226 #define WLAN_FSTYPE_CFPOLL 0x06
227 #define WLAN_FSTYPE_CFACK_CFPOLL 0x07
229 /*--- FC Constants v. 2.0 ------------------------------------*/
230 /* Each constant is defined twice: WF_CONST is in host */
231 /* byteorder, WF_CONSTi is in ieee byteorder. */
232 /* Usage: */
233 /* printf("the frame subtype is %X", WF_FC_FTYPEi & rx.fc); */
234 /* tx.fc = WF_FTYPE_CTLi | WF_FSTYPE_RTSi; */
235 /*------------------------------------------------------------*/
237 enum {
238 /*--- Frame Control Field -------------------------------------*/
239 /* Protocol version: always 0 for current 802.11 standards */
240 IEEE16(WF_FC_PVER, 0x0003)
241 IEEE16(WF_FC_FTYPE, 0x000c)
242 IEEE16(WF_FC_FSTYPE, 0x00f0)
243 IEEE16(WF_FC_TODS, 0x0100)
244 IEEE16(WF_FC_FROMDS, 0x0200)
245 IEEE16(WF_FC_FROMTODS, 0x0300)
246 IEEE16(WF_FC_MOREFRAG, 0x0400)
247 IEEE16(WF_FC_RETRY, 0x0800)
248 /* Indicates PS mode in which STA will be after successful completion
249 ** of current frame exchange sequence. Always 0 for AP frames */
250 IEEE16(WF_FC_PWRMGT, 0x1000)
251 /* What MoreData=1 means:
252 ** From AP to STA in PS mode: don't sleep yet, I have more frames for you
253 ** From Contention-Free (CF) Pollable STA in response to a CF-Poll:
254 ** STA has buffered frames for transmission in response to next CF-Poll
255 ** Bcast/mcast frames transmitted from AP:
256 ** when additional bcast/mcast frames remain to be transmitted by AP
257 ** during this beacon interval
258 ** In all other cases MoreData=0 */
259 IEEE16(WF_FC_MOREDATA, 0x2000)
260 IEEE16(WF_FC_ISWEP, 0x4000)
261 IEEE16(WF_FC_ORDER, 0x8000)
263 /* Frame Types */
264 IEEE16(WF_FTYPE_MGMT, 0x00)
265 IEEE16(WF_FTYPE_CTL, 0x04)
266 IEEE16(WF_FTYPE_DATA, 0x08)
268 /* Frame subtypes */
269 /* Management */
270 IEEE16(WF_FSTYPE_ASSOCREQ, 0x00)
271 IEEE16(WF_FSTYPE_ASSOCRESP, 0x10)
272 IEEE16(WF_FSTYPE_REASSOCREQ, 0x20)
273 IEEE16(WF_FSTYPE_REASSOCRESP, 0x30)
274 IEEE16(WF_FSTYPE_PROBEREQ, 0x40)
275 IEEE16(WF_FSTYPE_PROBERESP, 0x50)
276 IEEE16(WF_FSTYPE_BEACON, 0x80)
277 IEEE16(WF_FSTYPE_ATIM, 0x90)
278 IEEE16(WF_FSTYPE_DISASSOC, 0xa0)
279 IEEE16(WF_FSTYPE_AUTHEN, 0xb0)
280 IEEE16(WF_FSTYPE_DEAUTHEN, 0xc0)
282 /* Control */
283 IEEE16(WF_FSTYPE_PSPOLL, 0xa0)
284 IEEE16(WF_FSTYPE_RTS, 0xb0)
285 IEEE16(WF_FSTYPE_CTS, 0xc0)
286 IEEE16(WF_FSTYPE_ACK, 0xd0)
287 IEEE16(WF_FSTYPE_CFEND, 0xe0)
288 IEEE16(WF_FSTYPE_CFENDCFACK, 0xf0)
290 /* Data */
291 IEEE16(WF_FSTYPE_DATAONLY, 0x00)
292 IEEE16(WF_FSTYPE_DATA_CFACK, 0x10)
293 IEEE16(WF_FSTYPE_DATA_CFPOLL, 0x20)
294 IEEE16(WF_FSTYPE_DATA_CFACK_CFPOLL, 0x30)
295 IEEE16(WF_FSTYPE_NULL, 0x40)
296 IEEE16(WF_FSTYPE_CFACK, 0x50)
297 IEEE16(WF_FSTYPE_CFPOLL, 0x60)
298 IEEE16(WF_FSTYPE_CFACK_CFPOLL, 0x70)
302 /***********************************************************************
303 ** Macros
306 /*--- Duration Macros ----------------------------------------*/
307 /* Macros to get/set the bitfields of the Duration Field */
308 /* - the duration value is only valid when bit15 is zero */
309 /* - the firmware handles these values, so I'm not going */
310 /* these macros right now. */
311 /*------------------------------------------------------------*/
313 /*--- Sequence Control Macros -------------------------------*/
314 /* Macros to get/set the bitfields of the Sequence Control */
315 /* Field. */
316 /*------------------------------------------------------------*/
317 #define WLAN_GET_SEQ_FRGNUM(n) ((u16)(n) & 0x000f)
318 #define WLAN_GET_SEQ_SEQNUM(n) (((u16)(n) & 0xfff0) >> 4)
320 /*--- Data ptr macro -----------------------------------------*/
321 /* Creates a u8* to the data portion of a frame */
322 /* Assumes you're passing in a ptr to the beginning of the hdr*/
323 /*------------------------------------------------------------*/
324 #define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN)
325 #define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN)
328 /***********************************************************************
329 ** Types
332 /* 802.11 header type
334 ** Note the following:
335 ** a1 *always* is receiver's mac or bcast/mcast
336 ** a2 *always* is transmitter's mac, if a2 exists
337 ** seq: [0:3] frag#, [4:15] seq# - used for dup detection
338 ** (dups from retries have same seq#) */
339 typedef struct wlan_hdr {
340 u16 fc __WLAN_ATTRIB_PACK__;
341 u16 dur __WLAN_ATTRIB_PACK__;
342 u8 a1[ETH_ALEN] __WLAN_ATTRIB_PACK__;
343 u8 a2[ETH_ALEN] __WLAN_ATTRIB_PACK__;
344 u8 a3[ETH_ALEN] __WLAN_ATTRIB_PACK__;
345 u16 seq __WLAN_ATTRIB_PACK__;
346 u8 a4[ETH_ALEN] __WLAN_ATTRIB_PACK__;
347 } wlan_hdr_t;
349 /* Separate structs for use if frame type is known */
350 typedef struct wlan_hdr_a3 {
351 u16 fc __WLAN_ATTRIB_PACK__;
352 u16 dur __WLAN_ATTRIB_PACK__;
353 u8 a1[ETH_ALEN] __WLAN_ATTRIB_PACK__;
354 u8 a2[ETH_ALEN] __WLAN_ATTRIB_PACK__;
355 u8 a3[ETH_ALEN] __WLAN_ATTRIB_PACK__;
356 u16 seq __WLAN_ATTRIB_PACK__;
357 } wlan_hdr_a3_t;
359 typedef struct wlan_hdr_mgmt {
360 u16 fc __WLAN_ATTRIB_PACK__;
361 u16 dur __WLAN_ATTRIB_PACK__;
362 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
363 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
364 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
365 u16 seq __WLAN_ATTRIB_PACK__;
366 } wlan_hdr_mgmt_t;
368 #ifdef NOT_NEEDED_YET
369 typedef struct { /* ad-hoc peer->peer (to/from DS = 0/0) */
370 u16 fc __WLAN_ATTRIB_PACK__;
371 u16 dur __WLAN_ATTRIB_PACK__;
372 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
373 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
374 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
375 u16 seq __WLAN_ATTRIB_PACK__;
376 } ibss;
377 typedef struct { /* ap->sta (to/from DS = 0/1) */
378 u16 fc __WLAN_ATTRIB_PACK__;
379 u16 dur __WLAN_ATTRIB_PACK__;
380 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
381 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
382 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
383 u16 seq __WLAN_ATTRIB_PACK__;
384 } fromap;
385 typedef struct { /* sta->ap (to/from DS = 1/0) */
386 u16 fc __WLAN_ATTRIB_PACK__;
387 u16 dur __WLAN_ATTRIB_PACK__;
388 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
389 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
390 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
391 u16 seq __WLAN_ATTRIB_PACK__;
392 } toap;
393 typedef struct { /* wds->wds (to/from DS = 1/1), the only 4addr pkt */
394 u16 fc __WLAN_ATTRIB_PACK__;
395 u16 dur __WLAN_ATTRIB_PACK__;
396 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
397 u8 ta[ETH_ALEN] __WLAN_ATTRIB_PACK__;
398 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
399 u16 seq __WLAN_ATTRIB_PACK__;
400 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
401 } wds;
402 typedef struct { /* all management packets */
403 u16 fc __WLAN_ATTRIB_PACK__;
404 u16 dur __WLAN_ATTRIB_PACK__;
405 u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
406 u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
407 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
408 u16 seq __WLAN_ATTRIB_PACK__;
409 } mgmt;
410 typedef struct { /* has no body, just a FCS */
411 u16 fc __WLAN_ATTRIB_PACK__;
412 u16 dur __WLAN_ATTRIB_PACK__;
413 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
414 u8 ta[ETH_ALEN] __WLAN_ATTRIB_PACK__;
415 } rts;
416 typedef struct { /* has no body, just a FCS */
417 u16 fc __WLAN_ATTRIB_PACK__;
418 u16 dur __WLAN_ATTRIB_PACK__;
419 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
420 } cts;
421 typedef struct { /* has no body, just a FCS */
422 u16 fc __WLAN_ATTRIB_PACK__;
423 u16 dur __WLAN_ATTRIB_PACK__;
424 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
425 } ack;
426 typedef struct { /* has no body, just a FCS */
427 u16 fc __WLAN_ATTRIB_PACK__;
428 /* NB: this one holds Assoc ID in dur field: */
429 u16 aid __WLAN_ATTRIB_PACK__;
430 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
431 u8 ta[ETH_ALEN] __WLAN_ATTRIB_PACK__;
432 } pspoll;
433 typedef struct { /* has no body, just a FCS */
434 u16 fc __WLAN_ATTRIB_PACK__;
435 u16 dur __WLAN_ATTRIB_PACK__;
436 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
437 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
438 } cfend;
439 typedef struct { /* has no body, just a FCS */
440 u16 fc __WLAN_ATTRIB_PACK__;
441 u16 dur __WLAN_ATTRIB_PACK__;
442 u8 ra[ETH_ALEN] __WLAN_ATTRIB_PACK__;
443 u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
444 } cfendcfack;
445 #endif
447 /* Prism header emulation (monitor mode) */
448 typedef struct wlanitem_u32 {
449 u32 did __WLAN_ATTRIB_PACK__;
450 u16 status __WLAN_ATTRIB_PACK__;
451 u16 len __WLAN_ATTRIB_PACK__;
452 u32 data __WLAN_ATTRIB_PACK__;
453 } wlanitem_u32_t;
454 #define WLANITEM_STATUS_data_ok 0
455 #define WLANITEM_STATUS_no_value 1
456 #define WLANITEM_STATUS_invalid_itemname 2
457 #define WLANITEM_STATUS_invalid_itemdata 3
458 #define WLANITEM_STATUS_missing_itemdata 4
459 #define WLANITEM_STATUS_incomplete_itemdata 5
460 #define WLANITEM_STATUS_invalid_msg_did 6
461 #define WLANITEM_STATUS_invalid_mib_did 7
462 #define WLANITEM_STATUS_missing_conv_func 8
463 #define WLANITEM_STATUS_string_too_long 9
464 #define WLANITEM_STATUS_data_out_of_range 10
465 #define WLANITEM_STATUS_string_too_short 11
466 #define WLANITEM_STATUS_missing_valid_func 12
467 #define WLANITEM_STATUS_unknown 13
468 #define WLANITEM_STATUS_invalid_did 14
469 #define WLANITEM_STATUS_missing_print_func 15
471 #define WLAN_DEVNAMELEN_MAX 16
472 typedef struct wlansniffrm {
473 u32 msgcode __WLAN_ATTRIB_PACK__;
474 u32 msglen __WLAN_ATTRIB_PACK__;
475 u8 devname[WLAN_DEVNAMELEN_MAX] __WLAN_ATTRIB_PACK__;
476 wlanitem_u32_t hosttime __WLAN_ATTRIB_PACK__;
477 wlanitem_u32_t mactime __WLAN_ATTRIB_PACK__;
478 wlanitem_u32_t channel __WLAN_ATTRIB_PACK__;
479 wlanitem_u32_t rssi __WLAN_ATTRIB_PACK__;
480 wlanitem_u32_t sq __WLAN_ATTRIB_PACK__;
481 wlanitem_u32_t signal __WLAN_ATTRIB_PACK__;
482 wlanitem_u32_t noise __WLAN_ATTRIB_PACK__;
483 wlanitem_u32_t rate __WLAN_ATTRIB_PACK__;
484 wlanitem_u32_t istx __WLAN_ATTRIB_PACK__; /* tx? 0:no 1:yes */
485 wlanitem_u32_t frmlen __WLAN_ATTRIB_PACK__;
486 } wlansniffrm_t;
487 #define WLANSNIFFFRM 0x0041
488 #define WLANSNIFFFRM_hosttime 0x1041
489 #define WLANSNIFFFRM_mactime 0x2041
490 #define WLANSNIFFFRM_channel 0x3041
491 #define WLANSNIFFFRM_rssi 0x4041
492 #define WLANSNIFFFRM_sq 0x5041
493 #define WLANSNIFFFRM_signal 0x6041
494 #define WLANSNIFFFRM_noise 0x7041
495 #define WLANSNIFFFRM_rate 0x8041
496 #define WLANSNIFFFRM_istx 0x9041
497 #define WLANSNIFFFRM_frmlen 0xA041