5 * Common code specific definitions for mac80211 Prism54 drivers
7 * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
8 * Copyright (c) 2007, Christian Lamparter <chunkeey@web.de>
11 * - the islsm (softmac prism54) driver, which is:
12 * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
14 * - LMAC API interface header file for STLC4560 (lmac_longbow.h)
15 * Copyright (C) 2007 Conexant Systems, Inc.
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
26 } __attribute__((packed));
28 #define PDR_SYNTH_FRONTEND_MASK 0x0007
29 #define PDR_SYNTH_FRONTEND_DUETTE3 0x0001
30 #define PDR_SYNTH_FRONTEND_DUETTE2 0x0002
31 #define PDR_SYNTH_FRONTEND_FRISBEE 0x0003
32 #define PDR_SYNTH_FRONTEND_XBOW 0x0004
33 #define PDR_SYNTH_FRONTEND_LONGBOW 0x0005
34 #define PDR_SYNTH_IQ_CAL_MASK 0x0018
35 #define PDR_SYNTH_IQ_CAL_PA_DETECTOR 0x0000
36 #define PDR_SYNTH_IQ_CAL_DISABLED 0x0008
37 #define PDR_SYNTH_IQ_CAL_ZIF 0x0010
38 #define PDR_SYNTH_FAA_SWITCH_MASK 0x0020
39 #define PDR_SYNTH_FAA_SWITCH_ENABLED 0x0020
40 #define PDR_SYNTH_24_GHZ_MASK 0x0040
41 #define PDR_SYNTH_24_GHZ_DISABLED 0x0040
42 #define PDR_SYNTH_5_GHZ_MASK 0x0080
43 #define PDR_SYNTH_5_GHZ_DISABLED 0x0080
44 #define PDR_SYNTH_RX_DIV_MASK 0x0100
45 #define PDR_SYNTH_RX_DIV_SUPPORTED 0x0100
46 #define PDR_SYNTH_TX_DIV_MASK 0x0200
47 #define PDR_SYNTH_TX_DIV_SUPPORTED 0x0200
49 struct bootrec_exp_if {
55 } __attribute__((packed));
57 #define BR_DESC_PRIV_CAP_WEP BIT(0)
58 #define BR_DESC_PRIV_CAP_TKIP BIT(1)
59 #define BR_DESC_PRIV_CAP_MICHAEL BIT(2)
60 #define BR_DESC_PRIV_CAP_CCX_CP BIT(3)
61 #define BR_DESC_PRIV_CAP_CCX_MIC BIT(4)
62 #define BR_DESC_PRIV_CAP_AESCCMP BIT(5)
80 } __attribute__((packed));
82 #define BR_CODE_MIN 0x80000000
83 #define BR_CODE_COMPONENT_ID 0x80000001
84 #define BR_CODE_COMPONENT_VERSION 0x80000002
85 #define BR_CODE_DEPENDENT_IF 0x80000003
86 #define BR_CODE_EXPOSED_IF 0x80000004
87 #define BR_CODE_DESCR 0x80000101
88 #define BR_CODE_MAX 0x8FFFFFFF
89 #define BR_CODE_END_OF_BRA 0xFF0000FF
90 #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF
92 #define P54_HDR_FLAG_DATA_ALIGN BIT(14)
93 #define P54_HDR_FLAG_DATA_OUT_PROMISC BIT(0)
94 #define P54_HDR_FLAG_DATA_OUT_TIMESTAMP BIT(1)
95 #define P54_HDR_FLAG_DATA_OUT_SEQNR BIT(2)
96 #define P54_HDR_FLAG_DATA_OUT_BIT3 BIT(3)
97 #define P54_HDR_FLAG_DATA_OUT_BURST BIT(4)
98 #define P54_HDR_FLAG_DATA_OUT_NOCANCEL BIT(5)
99 #define P54_HDR_FLAG_DATA_OUT_CLEARTIM BIT(6)
100 #define P54_HDR_FLAG_DATA_OUT_HITCHHIKE BIT(7)
101 #define P54_HDR_FLAG_DATA_OUT_COMPRESS BIT(8)
102 #define P54_HDR_FLAG_DATA_OUT_CONCAT BIT(9)
103 #define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT BIT(10)
104 #define P54_HDR_FLAG_DATA_OUT_WAITEOSP BIT(11)
106 #define P54_HDR_FLAG_DATA_IN_FCS_GOOD BIT(0)
107 #define P54_HDR_FLAG_DATA_IN_MATCH_MAC BIT(1)
108 #define P54_HDR_FLAG_DATA_IN_MCBC BIT(2)
109 #define P54_HDR_FLAG_DATA_IN_BEACON BIT(3)
110 #define P54_HDR_FLAG_DATA_IN_MATCH_BSS BIT(4)
111 #define P54_HDR_FLAG_DATA_IN_BCAST_BSS BIT(5)
112 #define P54_HDR_FLAG_DATA_IN_DATA BIT(6)
113 #define P54_HDR_FLAG_DATA_IN_TRUNCATED BIT(7)
114 #define P54_HDR_FLAG_DATA_IN_BIT8 BIT(8)
115 #define P54_HDR_FLAG_DATA_IN_TRANSPARENT BIT(9)
117 /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
120 __le16 len; /* includes both code and data */
123 } __attribute__ ((packed));
125 struct eeprom_pda_wrap {
131 } __attribute__ ((packed));
133 struct p54_iq_autocal_entry {
135 } __attribute__ ((packed));
137 struct pda_iq_autocal_entry {
139 struct p54_iq_autocal_entry params;
140 } __attribute__ ((packed));
142 struct pda_channel_output_limit {
150 } __attribute__ ((packed));
152 struct pda_pa_curve_data_sample_rev0 {
156 } __attribute__ ((packed));
158 struct pda_pa_curve_data_sample_rev1 {
166 } __attribute__ ((packed));
168 struct p54_pa_curve_data_sample {
177 } __attribute__ ((packed));
179 struct pda_pa_curve_data {
182 u8 points_per_channel;
185 } __attribute__ ((packed));
187 struct pda_rssi_cal_entry {
190 } __attribute__ ((packed));
196 } __attribute__ ((packed));
199 * Warning: Longbow's structures are bogus.
201 struct p54_channel_output_limit_longbow {
202 __le16 rf_power_points[12];
203 } __attribute__ ((packed));
205 struct p54_pa_curve_data_sample_longbow {
210 } points[3] __attribute__ ((packed));
211 } __attribute__ ((packed));
213 struct pda_custom_wrapper {
219 } __attribute__ ((packed));
222 * this defines the PDR codes used to build PDAs as defined in document
223 * number 553155. The current implementation mirrors version 1.1 of the
224 * document and lists only PDRs supported by the ARM platform.
227 /* common and choice range (0x0000 - 0x0fff) */
228 #define PDR_END 0x0000
229 #define PDR_MANUFACTURING_PART_NUMBER 0x0001
230 #define PDR_PDA_VERSION 0x0002
231 #define PDR_NIC_SERIAL_NUMBER 0x0003
233 #define PDR_MAC_ADDRESS 0x0101
234 #define PDR_REGULATORY_DOMAIN_LIST 0x0103
235 #define PDR_TEMPERATURE_TYPE 0x0107
237 #define PDR_PRISM_PCI_IDENTIFIER 0x0402
239 /* ARM range (0x1000 - 0x1fff) */
240 #define PDR_COUNTRY_INFORMATION 0x1000
241 #define PDR_INTERFACE_LIST 0x1001
242 #define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
243 #define PDR_OEM_NAME 0x1003
244 #define PDR_PRODUCT_NAME 0x1004
245 #define PDR_UTF8_OEM_NAME 0x1005
246 #define PDR_UTF8_PRODUCT_NAME 0x1006
247 #define PDR_COUNTRY_LIST 0x1007
248 #define PDR_DEFAULT_COUNTRY 0x1008
250 #define PDR_ANTENNA_GAIN 0x1100
252 #define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
253 #define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
254 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
255 #define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
256 #define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
257 #define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
258 #define PDR_REGULATORY_POWER_LIMITS 0x1907
259 #define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
260 #define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
261 #define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
263 /* reserved range (0x2000 - 0x7fff) */
265 /* customer range (0x8000 - 0xffff) */
266 #define PDR_BASEBAND_REGISTERS 0x8000
267 #define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
269 /* used by our modificated eeprom image */
270 #define PDR_RSSI_LINEAR_APPROXIMATION_CUSTOM 0xDEAD
271 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS_CUSTOM 0xBEEF
272 #define PDR_PRISM_PA_CAL_CURVE_DATA_CUSTOM 0xB05D
274 /* PDR definitions for default country & country list */
275 #define PDR_COUNTRY_CERT_CODE 0x80
276 #define PDR_COUNTRY_CERT_CODE_REAL 0x00
277 #define PDR_COUNTRY_CERT_CODE_PSEUDO 0x80
278 #define PDR_COUNTRY_CERT_BAND 0x40
279 #define PDR_COUNTRY_CERT_BAND_2GHZ 0x00
280 #define PDR_COUNTRY_CERT_BAND_5GHZ 0x40
281 #define PDR_COUNTRY_CERT_IODOOR 0x30
282 #define PDR_COUNTRY_CERT_IODOOR_BOTH 0x00
283 #define PDR_COUNTRY_CERT_IODOOR_INDOOR 0x20
284 #define PDR_COUNTRY_CERT_IODOOR_OUTDOOR 0x30
285 #define PDR_COUNTRY_CERT_INDEX 0x0F
287 struct p54_eeprom_lm86 {
302 } __attribute__ ((packed));
303 } __attribute__ ((packed));
305 enum p54_rx_decrypt_status {
306 P54_DECRYPT_NONE = 0,
309 P54_DECRYPT_NOMICHAEL,
310 P54_DECRYPT_NOCKIPMIC,
311 P54_DECRYPT_FAIL_WEP,
312 P54_DECRYPT_FAIL_TKIP,
313 P54_DECRYPT_FAIL_MICHAEL,
314 P54_DECRYPT_FAIL_CKIPKP,
315 P54_DECRYPT_FAIL_CKIPMIC,
316 P54_DECRYPT_FAIL_AESCCMP
332 } __attribute__ ((packed));
338 P54_TRAP_FAA_RADIO_ON,
339 P54_TRAP_FAA_RADIO_OFF,
350 } __attribute__ ((packed));
352 enum p54_frame_sent_status {
356 P54_TX_PSM_CANCELLED = 4
359 struct p54_frame_sent {
367 } __attribute__ ((packed));
369 enum p54_tx_data_crypt {
373 P54_CRYPTO_TKIPMICHAEL,
374 P54_CRYPTO_CCX_WEPMIC,
375 P54_CRYPTO_CCX_KPMIC,
380 enum p54_tx_data_queue {
381 P54_QUEUE_BEACON = 0,
382 P54_QUEUE_FWSCAN = 1,
387 P54_QUEUE_AC_NUM = 4,
412 } __attribute__((packed)) longbow;
417 } __attribute__ ((packed)) normal;
418 } __attribute__ ((packed));
421 } __attribute__ ((packed));
424 #define P54_TX_FRAME_LIFETIME 2000
425 #define P54_TX_TIMEOUT 4000
426 #define P54_STATISTICS_UPDATE 5000
428 #define P54_FILTER_TYPE_NONE 0
429 #define P54_FILTER_TYPE_STATION BIT(0)
430 #define P54_FILTER_TYPE_IBSS BIT(1)
431 #define P54_FILTER_TYPE_AP BIT(2)
432 #define P54_FILTER_TYPE_TRANSPARENT BIT(3)
433 #define P54_FILTER_TYPE_PROMISCUOUS BIT(4)
434 #define P54_FILTER_TYPE_HIBERNATE BIT(5)
435 #define P54_FILTER_TYPE_NOACK BIT(6)
436 #define P54_FILTER_TYPE_RX_DISABLED BIT(7)
438 struct p54_setup_mac {
440 u8 mac_addr[ETH_ALEN];
446 __le32 basic_rate_mask;
453 } v1 __attribute__ ((packed));
460 __le32 basic_rate_mask;
463 u8 rx_rssi_threshold;
466 __le16 lpf_bandwidth;
467 __le16 osc_start_delay;
468 } v2 __attribute__ ((packed));
469 } __attribute__ ((packed));
470 } __attribute__ ((packed));
472 #define P54_SETUP_V1_LEN 40
473 #define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))
475 #define P54_SCAN_EXIT BIT(0)
476 #define P54_SCAN_TRAP BIT(1)
477 #define P54_SCAN_ACTIVE BIT(2)
478 #define P54_SCAN_FILTER BIT(3)
480 struct p54_scan_head {
485 } __attribute__ ((packed));
487 struct p54_scan_body {
488 u8 pa_points_per_curve;
494 struct p54_pa_curve_data_sample curve_data[8];
499 } __attribute__ ((packed));
501 struct p54_scan_body_longbow {
502 struct p54_channel_output_limit_longbow power_limits;
503 struct p54_pa_curve_data_sample_longbow curve_data[8];
504 __le16 unkn[6]; /* maybe more power_limits or rate_mask */
505 } __attribute__ ((packed));
507 union p54_scan_body_union {
508 struct p54_scan_body normal;
509 struct p54_scan_body_longbow longbow;
510 } __attribute__ ((packed));
512 struct p54_scan_tail_rate {
513 __le32 basic_rate_mask;
515 } __attribute__ ((packed));
519 __le16 led_temporary;
520 __le16 led_permanent;
522 } __attribute__ ((packed));
529 struct p54_edcf_queue_param queue[8];
532 __le16 round_trip_delay;
533 } __attribute__ ((packed));
535 struct p54_statistics {
545 __le32 sample_noise[8];
548 } __attribute__ ((packed));
550 struct p54_xbow_synth {
555 } __attribute__ ((packed));
559 } __attribute__ ((packed));
561 struct p54_keycache {
569 } __attribute__ ((packed));
576 __le16 durations[32];
577 } __attribute__ ((packed));
579 struct p54_psm_interval {
582 } __attribute__ ((packed));
584 #define P54_PSM_CAM 0
585 #define P54_PSM BIT(0)
586 #define P54_PSM_DTIM BIT(1)
587 #define P54_PSM_MCBC BIT(2)
588 #define P54_PSM_CHECKSUM BIT(3)
589 #define P54_PSM_SKIP_MORE_DATA BIT(4)
590 #define P54_PSM_BEACON_TIMEOUT BIT(5)
591 #define P54_PSM_HFOSLEEP BIT(6)
592 #define P54_PSM_AUTOSWITCH_SLEEP BIT(7)
593 #define P54_PSM_LPIT BIT(8)
594 #define P54_PSM_BF_UCAST_SKIP BIT(9)
595 #define P54_PSM_BF_MCAST_SKIP BIT(10)
600 struct p54_psm_interval intervals[4];
601 u8 beacon_rssi_skip_max;
602 u8 rssi_delta_threshold;
605 } __attribute__ ((packed));
607 #define MC_FILTER_ADDRESS_NUM 4
609 struct p54_group_address_table {
610 __le16 filter_enable;
612 u8 mac_list[MC_FILTER_ADDRESS_NUM][ETH_ALEN];
613 } __attribute__ ((packed));
615 struct p54_txcancel {
617 } __attribute__ ((packed));
619 struct p54_sta_unlock {
622 } __attribute__ ((packed));
624 #define P54_TIM_CLEAR BIT(15)
629 } __attribute__ ((packed));
631 struct p54_cce_quiet {
633 } __attribute__ ((packed));
635 struct p54_bt_balancer {
638 } __attribute__ ((packed));
640 struct p54_arp_table {
641 __le16 filter_enable;
643 } __attribute__ ((packed));
645 #endif /* P54COMMON_H */