1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 #ifndef _DEV_IC_ANREG_H
38 #define _DEV_IC_ANREG_H
39
40
41
42
43 #define AN_IOSIZ 0x40
44
45
46
47
48
49
50 #define AN_COMMAND 0x00
51 #define AN_PARAM0 0x02
52 #define AN_PARAM1 0x04
53 #define AN_PARAM2 0x06
54 #define AN_STATUS 0x08
55 #define AN_RESP0 0x0A
56 #define AN_RESP1 0x0C
57 #define AN_RESP2 0x0E
58 #define AN_LINKSTAT 0x10
59
60
61 #define AN_CMD_BUSY 0x8000
62 #define AN_CMD_NO_ACK 0x0080
63 #define AN_CMD_CODE_MASK 0x003F
64 #define AN_CMD_QUAL_MASK 0x7F00
65
66
67 #define AN_CMD_NOOP 0x0000
68 #define AN_CMD_ENABLE 0x0001
69 #define AN_CMD_DISABLE 0x0002
70 #define AN_CMD_FORCE_SYNCLOSS 0x0003
71 #define AN_CMD_FW_RESTART 0x0004
72 #define AN_CMD_HOST_SLEEP 0x0005
73 #define AN_CMD_MAGIC_PKT 0x0006
74 #define AN_CMD_READCFG 0x0008
75 #define AN_CMD_SET_MODE 0x0009
76 #define AN_CMD_ALLOC_MEM 0x000A
77 #define AN_CMD_TX 0x000B
78 #define AN_CMD_DEALLOC_MEM 0x000C
79 #define AN_CMD_NOOP2 0x0010
80 #define AN_CMD_ACCESS 0x0021
81 #define AN_CMD_ALLOC_BUF 0x0028
82 #define AN_CMD_PSP_NODES 0x0030
83 #define AN_CMD_SET_PHYREG 0x003E
84 #define AN_CMD_TX_TEST 0x003F
85 #define AN_CMD_SLEEP 0x0085
86 #define AN_CMD_SAVECFG 0x0108
87
88
89
90
91
92 #define AN_RECLAIM 0x0100
93
94
95
96
97 #define AN_ACCESS_READ 0x0000
98 #define AN_ACCESS_WRITE 0x0100
99
100
101
102
103 #define AN_PROGRAM_DISABLE 0x0000
104 #define AN_PROGRAM_ENABLE_RAM 0x0100
105 #define AN_PROGRAM_ENABLE_NVRAM 0x0200
106 #define AN_PROGRAM_NVRAM 0x0300
107
108
109 #define AN_STAT_CMD_CODE 0x003F
110 #define AN_STAT_CMD_RESULT 0x7F00
111
112
113 #define AN_LINKSTAT_ASSOCIATED 0x0400
114 #define AN_LINKSTAT_AUTHFAIL 0x0300
115 #define AN_LINKSTAT_ASSOC_FAIL 0x8400
116 #define AN_LINKSTAT_DISASSOC 0x8200
117 #define AN_LINKSTAT_DEAUTH 0x8100
118 #define AN_LINKSTAT_SYNCLOST_TSF 0x8004
119 #define AN_LINKSTAT_SYNCLOST_HOSTREQ 0x8003
120 #define AN_LINKSTAT_SYNCLOST_AVGRETRY 0x8002
121 #define AN_LINKSTAT_SYNCLOST_MAXRETRY 0x8001
122 #define AN_LINKSTAT_SYNCLOST_MISSBEACON 0x8000
123
124
125 #define AN_RX_FID 0x20
126 #define AN_ALLOC_FID 0x22
127 #define AN_TX_CMP_FID 0x24
128
129
130
131
132
133
134
135
136
137 #define AN_SEL0 0x18
138 #define AN_SEL1 0x1A
139 #define AN_OFF0 0x1C
140 #define AN_OFF1 0x1E
141 #define AN_DATA0 0x36
142 #define AN_DATA1 0x38
143 #define AN_BAP0 AN_DATA0
144 #define AN_BAP1 AN_DATA1
145
146 #define AN_OFF_BUSY 0x8000
147 #define AN_OFF_ERR 0x4000
148 #define AN_OFF_DONE 0x2000
149 #define AN_OFF_DATAOFF 0x0FFF
150
151
152 #define AN_EVENT_STAT 0x30
153 #define AN_INT_EN 0x32
154 #define AN_EVENT_ACK 0x34
155
156
157 #define AN_EV_CLR_STUCK_BUSY 0x4000
158 #define AN_EV_WAKEREQUEST 0x2000
159 #define AN_EV_MIC 0x1000
160 #define AN_EV_TX_CPY 0x0400
161 #define AN_EV_AWAKE 0x0100
162 #define AN_EV_LINKSTAT 0x0080
163 #define AN_EV_CMD 0x0010
164 #define AN_EV_ALLOC 0x0008
165 #define AN_EV_TX_EXC 0x0004
166 #define AN_EV_TX 0x0002
167 #define AN_EV_RX 0x0001
168
169
170 #define AN_SW0 0x28
171 #define AN_SW1 0x2A
172 #define AN_SW2 0x2C
173 #define AN_SW3 0x2E
174
175 #define AN_CNTL 0x14
176
177 #define AN_CNTL_AUX_ENA 0xC000
178 #define AN_CNTL_AUX_ENA_STAT 0xC000
179 #define AN_CNTL_AUX_DIS_STAT 0x0000
180 #define AN_CNTL_AUX_ENA_CNTL 0x8000
181 #define AN_CNTL_AUX_DIS_CNTL 0x4000
182
183 #define AN_AUX_PAGE 0x3A
184 #define AN_AUX_OFFSET 0x3C
185 #define AN_AUX_DATA 0x3E
186
187
188
189
190 #define AN_RID_GENCONFIG 0xFF10
191 struct an_rid_genconfig {
192
193 u_int16_t an_opmode;
194 u_int16_t an_rxmode;
195 u_int16_t an_fragthresh;
196 u_int16_t an_rtsthresh;
197 u_int8_t an_macaddr[6];
198 u_int8_t an_rates[8];
199 u_int16_t an_shortretry_limit;
200 u_int16_t an_longretry_limit;
201 u_int16_t an_tx_msdu_lifetime;
202 u_int16_t an_rx_msdu_lifetime;
203 u_int16_t an_stationary;
204 u_int16_t an_ordering;
205 u_int16_t an_devtype;
206 u_int16_t an_rsvd0[5];
207
208 u_int16_t an_scanmode;
209 u_int16_t an_probedelay;
210 u_int16_t an_probe_energy_timeout;
211 u_int16_t an_probe_response_timeout;
212 u_int16_t an_beacon_listen_timeout;
213 u_int16_t an_ibss_join_net_timeout;
214 u_int16_t an_auth_timeout;
215 u_int16_t an_authtype;
216 u_int16_t an_assoc_timeout;
217 u_int16_t an_specified_ap_timeout;
218 u_int16_t an_offline_scan_interval;
219 u_int16_t an_offline_scan_duration;
220 u_int16_t an_link_loss_delay;
221 u_int16_t an_max_beacon_lost_time;
222 u_int16_t an_refresh_interval;
223 u_int16_t an_rsvd1;
224
225 u_int16_t an_psave_mode;
226 u_int16_t an_sleep_for_dtims;
227 u_int16_t an_listen_interval;
228 u_int16_t an_fast_listen_interval;
229 u_int16_t an_listen_decay;
230 u_int16_t an_fast_listen_decay;
231 u_int16_t an_rsvd2[2];
232
233 u_int16_t an_beacon_period;
234 u_int16_t an_atim_duration;
235 u_int16_t an_rsvd3;
236 u_int16_t an_ds_channel;
237 u_int16_t an_rsvd4;
238 u_int16_t an_dtim_period;
239 u_int16_t an_rsvd5[2];
240
241 u_int16_t an_radiotype;
242 u_int16_t an_diversity;
243 u_int16_t an_tx_power;
244 u_int16_t an_rss_thresh;
245 u_int16_t an_modulation_type;
246 u_int16_t an_short_preamble;
247 u_int16_t an_home_product;
248 u_int16_t an_rsvd6;
249
250 u_int8_t an_nodename[16];
251 u_int16_t an_arl_thresh;
252 u_int16_t an_arl_decay;
253 u_int16_t an_arl_delay;
254 u_int8_t an_rsvd7;
255 u_int8_t an_rsvd8;
256 u_int8_t an_magic_packet_action;
257 u_int8_t an_magic_packet_ctl;
258 u_int16_t an_rsvd9;
259 u_int16_t an_spare[24];
260 } __attribute__((__packed__));
261
262 #define AN_OPMODE_IBSS_ADHOC 0x0000
263 #define AN_OPMODE_INFRASTRUCTURE_STATION 0x0001
264 #define AN_OPMODE_AP 0x0002
265 #define AN_OPMODE_AP_REPEATER 0x0003
266 #define AN_OPMODE_UNMODIFIED_PAYLOAD 0x0100
267 #define AN_OPMODE_AIRONET_EXTENSIONS 0x0200
268 #define AN_OPMODE_AP_EXTENSIONS 0x0400
269 #define AN_OPMODE_ANTENNA_ALIGN 0x0800
270 #define AN_OPMODE_ETHER_LLC 0x1000
271 #define AN_OPMODE_LEAF_NODE 0x2000
272 #define AN_OPMODE_CF_POLLABLE 0x4000
273 #define AN_OPMODE_MIC 0x8000
274
275 #define AN_RXMODE_BC_MC_ADDR 0x0000
276 #define AN_RXMODE_BC_ADDR 0x0001
277 #define AN_RXMODE_ADDR 0x0002
278 #define AN_RXMODE_80211_MONITOR_CURBSS 0x0003
279 #define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004
280 #define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005
281 #define AN_RXMODE_NO_8023_HEADER 0x0100
282 #define AN_RXMODE_NORMALIZED_RSSI 0x0200
283
284 #define AN_RATE_1MBPS 0x0002
285 #define AN_RATE_2MBPS 0x0004
286 #define AN_RATE_5_5MBPS 0x000B
287 #define AN_RATE_11MBPS 0x0016
288
289 #define AN_DEVTYPE_PC4500 0x0065
290 #define AN_DEVTYPE_PC4800 0x006D
291
292 #define AN_SCANMODE_ACTIVE 0x0000
293 #define AN_SCANMODE_PASSIVE 0x0001
294 #define AN_SCANMODE_AIRONET_ACTIVE 0x0002
295
296 #define AN_AUTHTYPE_NONE 0x0000
297 #define AN_AUTHTYPE_OPEN 0x0001
298 #define AN_AUTHTYPE_SHAREDKEY 0x0002
299 #define AN_AUTHTYPE_MASK 0x00ff
300 #define AN_AUTHTYPE_PRIVACY_IN_USE 0x0100
301 #define AN_AUTHTYPE_ALLOW_UNENCRYPTED 0x0200
302 #define AN_AUTHTYPE_LEAP 0x1000
303
304 #define AN_PSAVE_CAM 0x0000
305 #define AN_PSAVE_PSP 0x0001
306 #define AN_PSAVE_PSP_CAM 0x0002
307
308 #define AN_RADIOTYPE_80211_FH 0x0001
309 #define AN_RADIOTYPE_80211_DS 0x0002
310 #define AN_RADIOTYPE_LM2000_DS 0x0004
311
312 #define AN_DIVERSITY_FACTORY_DEFAULT 0x0000
313 #define AN_DIVERSITY_ANTENNA_1_ONLY 0x0001
314 #define AN_DIVERSITY_ANTENNA_2_ONLY 0x0002
315 #define AN_DIVERSITY_ANTENNA_1_AND_2 0x0003
316
317 #define AN_TXPOWER_FACTORY_DEFAULT 0x0000
318 #define AN_TXPOWER_50MW 50
319 #define AN_TXPOWER_100MW 100
320 #define AN_TXPOWER_250MW 250
321
322
323
324
325
326
327
328 #define AN_RID_SSIDLIST 0xFF11
329 struct an_rid_ssidlist {
330 struct an_rid_ssid_entry {
331 u_int16_t an_ssid_len;
332 char an_ssid[32];
333 } __attribute__((__packed__)) an_entry[3];
334 } __attribute__((__packed__));
335
336
337
338
339 #define AN_RID_APLIST 0xFF12
340 struct an_rid_aplist {
341 u_int8_t an_ap1[8];
342 u_int8_t an_ap2[8];
343 u_int8_t an_ap3[8];
344 u_int8_t an_ap4[8];
345 } __attribute__((__packed__));
346
347
348
349
350 #define AN_RID_DRVNAME 0xFF13
351 struct an_rid_drvname {
352 u_int8_t an_drvname[16];
353 } __attribute__((__packed__));
354
355
356
357
358 #define AN_RID_ENCAP 0xFF14
359 #define AN_ENCAP_NENTS 8
360 struct an_rid_encap {
361 struct an_rid_encap_entry {
362 u_int16_t an_ethertype;
363 u_int16_t an_action;
364 } __attribute__((__packed__)) an_entry[AN_ENCAP_NENTS];
365 } __attribute__((__packed__));
366
367 #define AN_ENCAP_ACTION_RX 0x0001
368 #define AN_ENCAP_ACTION_TX 0x0002
369
370 #define AN_RXENCAP_NONE 0x0000
371 #define AN_RXENCAP_RFC1024 0x0001
372
373 #define AN_TXENCAP_RFC1024 0x0000
374 #define AN_TXENCAP_80211 0x0002
375
376
377
378
379 #define AN_RID_ACTUALCFG 0xFF20
380
381
382
383
384 #define AN_RID_CAPABILITIES 0xFF00
385 struct an_rid_caps {
386 u_int8_t an_oui[3];
387 u_int8_t an_rsvd0;
388 u_int16_t an_prodnum;
389 u_int8_t an_manufname[32];
390 u_int8_t an_prodname[16];
391 u_int8_t an_prodvers[8];
392 u_int8_t an_oemaddr[6];
393 u_int8_t an_aironetaddr[6];
394 u_int16_t an_radiotype;
395 u_int16_t an_regdomain;
396 u_int8_t an_callid[6];
397 u_int8_t an_rates[8];
398 u_int8_t an_rx_diversity;
399 u_int8_t an_tx_diversity;
400 u_int16_t an_tx_powerlevels[8];
401 u_int16_t an_hwrev;
402 u_int16_t an_hwcaps;
403 u_int16_t an_temprange;
404 u_int16_t an_fwrev;
405 u_int16_t an_fwsubrev;
406 u_int16_t an_ifacerev;
407 u_int16_t an_softcaps;
408 u_int16_t an_bootblockrev;
409 u_int16_t an_req_hw_support;
410
411 u_int16_t an_ext_softcaps;
412 u_int16_t an_spare[34];
413 } __attribute__((__packed__));
414
415 #define AN_REGDOMAIN_USA 0
416 #define AN_REGDOMAIN_EUROPE 1
417 #define AN_REGDOMAIN_JAPAN 2
418 #define AN_REGDOMAIN_SPAIN 3
419 #define AN_REGDOMAIN_FRANCE 4
420 #define AN_REGDOMAIN_BELGIUM 5
421 #define AN_REGDOMAIN_ISRAEL 6
422 #define AN_REGDOMAIN_CANADA 7
423 #define AN_REGDOMAIN_AUSTRALIA 8
424 #define AN_REGDOMAIN_JAPANWIDE 9
425
426 #define AN_SOFTCAPS_WEP 0x0002
427 #define AN_SOFTCAPS_RSSIMAP 0x0008
428 #define AN_SOFTCAPS_WEP128 0x0100
429
430 #define AN_EXT_SOFTCAPS_MIC 0x0001
431
432
433
434
435 #define AN_RID_APINFO 0xFF01
436 struct an_rid_apinfo {
437 u_int16_t an_tim_addr;
438 u_int16_t an_airo_addr;
439 } __attribute__((__packed__));
440
441
442
443
444 #define AN_RID_RADIOINFO 0xFF02
445
446
447
448
449
450
451
452
453
454
455
456
457 #define AN_RID_STATUS 0xFF50
458 struct an_rid_status {
459 u_int8_t an_macaddr[6];
460 u_int16_t an_opmode;
461 u_int16_t an_errcode;
462 u_int16_t an_cur_signal_strength;
463 u_int16_t an_ssidlen;
464 u_int8_t an_ssid[32];
465 u_int8_t an_ap_name[16];
466 u_int8_t an_cur_bssid[6];
467 u_int8_t an_prev_bssid1[6];
468 u_int8_t an_prev_bssid2[6];
469 u_int8_t an_prev_bssid3[6];
470 u_int16_t an_beacon_period;
471 u_int16_t an_dtim_period;
472 u_int16_t an_atim_duration;
473 u_int16_t an_hop_period;
474 u_int16_t an_cur_channel;
475 u_int16_t an_channel_set;
476 u_int16_t an_hops_to_backbone;
477 u_int16_t an_ap_total_load;
478 u_int16_t an_our_generated_load;
479 u_int16_t an_accumulated_arl;
480 u_int16_t an_cur_signal_quality;
481 u_int16_t an_current_tx_rate;
482 u_int16_t an_ap_device;
483 u_int16_t an_normalized_rssi;
484 u_int16_t an_short_pre_in_use;
485 u_int8_t an_ap_ip_addr[4];
486 u_int16_t an_max_noise_prev_sec;
487 u_int16_t an_avg_noise_prev_min;
488 u_int16_t an_max_noise_prev_min;
489 u_int16_t an_spare[11];
490 } __attribute__((__packed__));
491
492 #define AN_STATUS_OPMODE_CONFIGURED 0x0001
493 #define AN_STATUS_OPMODE_MAC_ENABLED 0x0002
494 #define AN_STATUS_OPMODE_RX_ENABLED 0x0004
495 #define AN_STATUS_OPMODE_IN_SYNC 0x0010
496 #define AN_STATUS_OPMODE_ASSOCIATED 0x0020
497 #define AN_STATUS_OPMODE_ERROR 0x8000
498
499
500
501
502 #define AN_RID_16BITS_CUM 0xFF60
503 #define AN_RID_16BITS_DELTA 0xFF61
504 #define AN_RID_16BITS_DELTACLR 0xFF62
505 #define AN_RID_32BITS_CUM 0xFF68
506 #define AN_RID_32BITS_DELTA 0xFF69
507 #define AN_RID_32BITS_DELTACLR 0xFF6A
508
509
510
511
512
513
514 struct an_rid_stats {
515 u_int16_t an_spacer;
516 u_int32_t an_rx_overruns;
517 u_int32_t an_rx_plcp_csum_errs;
518 u_int32_t an_rx_plcp_format_errs;
519 u_int32_t an_rx_plcp_len_errs;
520 u_int32_t an_rx_mac_crc_errs;
521 u_int32_t an_rx_mac_crc_ok;
522 u_int32_t an_rx_wep_errs;
523 u_int32_t an_rx_wep_ok;
524 u_int32_t an_retry_long;
525 u_int32_t an_retry_short;
526 u_int32_t an_retry_max;
527 u_int32_t an_no_ack;
528 u_int32_t an_no_cts;
529 u_int32_t an_rx_ack_ok;
530 u_int32_t an_rx_cts_ok;
531 u_int32_t an_tx_ack_ok;
532 u_int32_t an_tx_rts_ok;
533 u_int32_t an_tx_cts_ok;
534 u_int32_t an_tx_lmac_mcasts;
535 u_int32_t an_tx_lmac_bcasts;
536 u_int32_t an_tx_lmac_ucast_frags;
537 u_int32_t an_tx_lmac_ucasts;
538 u_int32_t an_tx_beacons;
539 u_int32_t an_rx_beacons;
540 u_int32_t an_tx_single_cols;
541 u_int32_t an_tx_multi_cols;
542 u_int32_t an_tx_defers_no;
543 u_int32_t an_tx_defers_prot;
544 u_int32_t an_tx_defers_energy;
545 u_int32_t an_rx_dups;
546 u_int32_t an_rx_partial;
547 u_int32_t an_tx_too_old;
548 u_int32_t an_rx_too_old;
549 u_int32_t an_lostsync_max_retries;
550 u_int32_t an_lostsync_missed_beacons;
551 u_int32_t an_lostsync_arl_exceeded;
552 u_int32_t an_lostsync_deauthed;
553 u_int32_t an_lostsync_disassociated;
554 u_int32_t an_lostsync_tsf_timing;
555 u_int32_t an_tx_host_mcasts;
556 u_int32_t an_tx_host_bcasts;
557 u_int32_t an_tx_host_ucasts;
558 u_int32_t an_tx_host_failed;
559 u_int32_t an_rx_host_mcasts;
560 u_int32_t an_rx_host_bcasts;
561 u_int32_t an_rx_host_ucasts;
562 u_int32_t an_rx_host_discarded;
563 u_int32_t an_tx_hmac_mcasts;
564 u_int32_t an_tx_hmac_bcasts;
565 u_int32_t an_tx_hmac_ucasts;
566 u_int32_t an_tx_hmac_failed;
567 u_int32_t an_rx_hmac_mcasts;
568 u_int32_t an_rx_hmac_bcasts;
569 u_int32_t an_rx_hmac_ucasts;
570 u_int32_t an_rx_hmac_discarded;
571 u_int32_t an_tx_hmac_accepted;
572 u_int32_t an_ssid_mismatches;
573 u_int32_t an_ap_mismatches;
574 u_int32_t an_rates_mismatches;
575 u_int32_t an_auth_rejects;
576 u_int32_t an_auth_timeouts;
577 u_int32_t an_assoc_rejects;
578 u_int32_t an_assoc_timeouts;
579 u_int32_t an_reason_outside_table;
580 u_int32_t an_reason1;
581 u_int32_t an_reason2;
582 u_int32_t an_reason3;
583 u_int32_t an_reason4;
584 u_int32_t an_reason5;
585 u_int32_t an_reason6;
586 u_int32_t an_reason7;
587 u_int32_t an_reason8;
588 u_int32_t an_reason9;
589 u_int32_t an_reason10;
590 u_int32_t an_reason11;
591 u_int32_t an_reason12;
592 u_int32_t an_reason13;
593 u_int32_t an_reason14;
594 u_int32_t an_reason15;
595 u_int32_t an_reason16;
596 u_int32_t an_reason17;
597 u_int32_t an_reason18;
598 u_int32_t an_reason19;
599 u_int32_t an_rx_mgmt_pkts;
600 u_int32_t an_tx_mgmt_pkts;
601 u_int32_t an_rx_refresh_pkts;
602 u_int32_t an_tx_refresh_pkts;
603 u_int32_t an_rx_poll_pkts;
604 u_int32_t an_tx_poll_pkts;
605 u_int32_t an_host_retries;
606 u_int32_t an_lostsync_hostreq;
607 u_int32_t an_host_tx_bytes;
608 u_int32_t an_host_rx_bytes;
609 u_int32_t an_uptime_usecs;
610 u_int32_t an_uptime_secs;
611 u_int32_t an_lostsync_better_ap;
612 u_int32_t an_rsvd[10];
613 } __attribute__((__packed__));
614
615
616
617
618 #define AN_RID_WEP_VOLATILE 0xFF15
619 struct an_rid_wepkey {
620 u_int16_t an_key_index;
621 u_int8_t an_mac_addr[6];
622 u_int16_t an_key_len;
623 u_int8_t an_key[16];
624 } __attribute__((__packed__));
625
626
627
628
629 #define AN_RID_WEP_PERSISTENT 0xFF16
630
631
632
633
634 #define AN_RID_LEAP_USER 0xFF23
635 #define AN_RID_LEAP_PASS 0xFF24
636 struct an_rid_leapkey {
637 u_int16_t an_key_len;
638 u_int8_t an_key[32];
639 } __attribute__((__packed__));
640
641
642
643
644 #define AN_RID_MIC 0xFF57
645 struct an_rid_mic {
646 u_int16_t an_mic_state;
647 u_int16_t an_mic_mcast_valid;
648 u_int8_t an_mic_mcast[16];
649 u_int16_t an_mic_ucast_valid;
650 u_int8_t an_mic_ucast[16];
651 } __attribute__((__packed__));
652
653
654
655
656 struct an_rxframe {
657 u_int32_t an_rx_time;
658 u_int16_t an_rx_status;
659 u_int16_t an_rx_payload_len;
660 u_int8_t an_rsvd0;
661 u_int8_t an_rx_signal_strength;
662 u_int8_t an_rx_rate;
663 u_int8_t an_rx_chan;
664 u_int8_t an_rx_assoc_cnt;
665 u_int8_t an_rsvd1[3];
666 u_int8_t an_plcp_hdr[4];
667 struct ieee80211_frame_addr4 an_whdr;
668 u_int16_t an_gaplen;
669 } __attribute__((__packed__));
670 #define AN_RXGAP_MAX 8
671
672
673
674
675 struct an_txframe {
676 u_int32_t an_tx_sw;
677 u_int16_t an_tx_status;
678 u_int16_t an_tx_payload_len;
679 u_int16_t an_tx_ctl;
680 u_int16_t an_tx_assoc_id;
681 u_int16_t an_tx_retry;
682 u_int8_t an_tx_assoc_cnt;
683 u_int8_t an_tx_rate;
684 u_int8_t an_tx_max_long_retries;
685 u_int8_t an_tx_max_short_retries;
686 u_int8_t an_rsvd0[2];
687 struct ieee80211_frame_addr4 an_whdr;
688 u_int16_t an_gaplen;
689 } __attribute__((__packed__));
690
691 #define AN_TXGAP_802_3 0
692 #define AN_TXGAP_802_11 6
693
694 struct an_802_3_hdr {
695 u_int16_t an_802_3_status;
696 u_int16_t an_802_3_payload_len;
697 u_int8_t an_dst_addr[6];
698 u_int8_t an_src_addr[6];
699 } __attribute__((__packed__));
700
701 #define AN_TXSTAT_EXCESS_RETRY 0x0002
702 #define AN_TXSTAT_LIFE_EXCEEDED 0x0004
703 #define AN_TXSTAT_AID_FAIL 0x0008
704 #define AN_TXSTAT_MAC_DISABLED 0x0010
705 #define AN_TXSTAT_ASSOC_LOST 0x0020
706
707 #define AN_TXCTL_RSVD 0x0001
708 #define AN_TXCTL_TXOK_INTR 0x0002
709 #define AN_TXCTL_TXERR_INTR 0x0004
710 #define AN_TXCTL_HEADER_TYPE 0x0008
711 #define AN_TXCTL_PAYLOAD_TYPE 0x0010
712 #define AN_TXCTL_NORELEASE 0x0020
713 #define AN_TXCTL_NORETRIES 0x0040
714 #define AN_TXCTL_CLEAR_AID 0x0080
715 #define AN_TXCTL_STRICT_ORDER 0x0100
716 #define AN_TXCTL_USE_RTS 0x0200
717
718 #define AN_HEADERTYPE_8023 0x0000
719 #define AN_HEADERTYPE_80211 0x0008
720
721 #define AN_PAYLOADTYPE_ETHER 0x0000
722 #define AN_PAYLOADTYPE_LLC 0x0010
723
724 #define AN_TXCTL_80211 \
725 (AN_TXCTL_TXOK_INTR|AN_TXCTL_TXERR_INTR|AN_HEADERTYPE_80211| \
726 AN_PAYLOADTYPE_LLC|AN_TXCTL_NORELEASE)
727
728 #define AN_TXCTL_8023 \
729 (AN_TXCTL_TXOK_INTR|AN_TXCTL_TXERR_INTR|AN_HEADERTYPE_8023| \
730 AN_PAYLOADTYPE_ETHER|AN_TXCTL_NORELEASE)
731
732 #define AN_STAT_BADCRC 0x0001
733 #define AN_STAT_UNDECRYPTABLE 0x0002
734 #define AN_STAT_ERRSTAT 0x0003
735 #define AN_STAT_MAC_PORT 0x0700
736 #define AN_STAT_1042 0x2000
737 #define AN_STAT_TUNNEL 0x4000
738 #define AN_STAT_WMP_MSG 0x6000
739 #define AN_RXSTAT_MSG_TYPE 0xE000
740
741 #define AN_ENC_TX_802_3 0x00
742 #define AN_ENC_TX_802_11 0x11
743 #define AN_ENC_TX_E_II 0x0E
744
745 #define AN_ENC_TX_1042 0x00
746 #define AN_ENC_TX_TUNNEL 0xF8
747
748 #define AN_TXCNTL_MACPORT 0x00FF
749 #define AN_TXCNTL_STRUCTTYPE 0xFF00
750
751 #endif