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_IQ_CAL_MASK 0x0018
30 #define PDR_SYNTH_IQ_CAL_PA_DETECTOR 0x0000
31 #define PDR_SYNTH_IQ_CAL_DISABLED 0x0008
32 #define PDR_SYNTH_IQ_CAL_ZIF 0x0010
33 #define PDR_SYNTH_FAA_SWITCH_MASK 0x0020
34 #define PDR_SYNTH_FAA_SWITCH_ENABLED 0x0020
35 #define PDR_SYNTH_24_GHZ_MASK 0x0040
36 #define PDR_SYNTH_24_GHZ_DISABLED 0x0040
37 #define PDR_SYNTH_5_GHZ_MASK 0x0080
38 #define PDR_SYNTH_5_GHZ_DISABLED 0x0080
39 #define PDR_SYNTH_RX_DIV_MASK 0x0100
40 #define PDR_SYNTH_RX_DIV_SUPPORTED 0x0100
41 #define PDR_SYNTH_TX_DIV_MASK 0x0200
42 #define PDR_SYNTH_TX_DIV_SUPPORTED 0x0200
44 struct bootrec_exp_if {
50 } __attribute__((packed));
52 #define BR_DESC_PRIV_CAP_WEP BIT(0)
53 #define BR_DESC_PRIV_CAP_TKIP BIT(1)
54 #define BR_DESC_PRIV_CAP_MICHAEL BIT(2)
55 #define BR_DESC_PRIV_CAP_CCX_CP BIT(3)
56 #define BR_DESC_PRIV_CAP_CCX_MIC BIT(4)
57 #define BR_DESC_PRIV_CAP_AESCCMP BIT(5)
75 } __attribute__((packed));
77 #define BR_CODE_MIN 0x80000000
78 #define BR_CODE_COMPONENT_ID 0x80000001
79 #define BR_CODE_COMPONENT_VERSION 0x80000002
80 #define BR_CODE_DEPENDENT_IF 0x80000003
81 #define BR_CODE_EXPOSED_IF 0x80000004
82 #define BR_CODE_DESCR 0x80000101
83 #define BR_CODE_MAX 0x8FFFFFFF
84 #define BR_CODE_END_OF_BRA 0xFF0000FF
85 #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF
87 #define P54_HDR_FLAG_DATA_ALIGN BIT(14)
88 #define P54_HDR_FLAG_DATA_OUT_PROMISC BIT(0)
89 #define P54_HDR_FLAG_DATA_OUT_TIMESTAMP BIT(1)
90 #define P54_HDR_FLAG_DATA_OUT_SEQNR BIT(2)
91 #define P54_HDR_FLAG_DATA_OUT_BIT3 BIT(3)
92 #define P54_HDR_FLAG_DATA_OUT_BURST BIT(4)
93 #define P54_HDR_FLAG_DATA_OUT_NOCANCEL BIT(5)
94 #define P54_HDR_FLAG_DATA_OUT_CLEARTIM BIT(6)
95 #define P54_HDR_FLAG_DATA_OUT_HITCHHIKE BIT(7)
96 #define P54_HDR_FLAG_DATA_OUT_COMPRESS BIT(8)
97 #define P54_HDR_FLAG_DATA_OUT_CONCAT BIT(9)
98 #define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT BIT(10)
99 #define P54_HDR_FLAG_DATA_OUT_WAITEOSP BIT(11)
101 #define P54_HDR_FLAG_DATA_IN_FCS_GOOD BIT(0)
102 #define P54_HDR_FLAG_DATA_IN_MATCH_MAC BIT(1)
103 #define P54_HDR_FLAG_DATA_IN_MCBC BIT(2)
104 #define P54_HDR_FLAG_DATA_IN_BEACON BIT(3)
105 #define P54_HDR_FLAG_DATA_IN_MATCH_BSS BIT(4)
106 #define P54_HDR_FLAG_DATA_IN_BCAST_BSS BIT(5)
107 #define P54_HDR_FLAG_DATA_IN_DATA BIT(6)
108 #define P54_HDR_FLAG_DATA_IN_TRUNCATED BIT(7)
109 #define P54_HDR_FLAG_DATA_IN_BIT8 BIT(8)
110 #define P54_HDR_FLAG_DATA_IN_TRANSPARENT BIT(9)
112 /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
115 __le16 len; /* includes both code and data */
118 } __attribute__ ((packed));
120 struct eeprom_pda_wrap {
126 } __attribute__ ((packed));
128 struct pda_iq_autocal_entry {
131 } __attribute__ ((packed));
133 struct pda_channel_output_limit {
141 } __attribute__ ((packed));
143 struct pda_pa_curve_data_sample_rev0 {
147 } __attribute__ ((packed));
149 struct pda_pa_curve_data_sample_rev1 {
157 } __attribute__ ((packed));
159 struct p54_pa_curve_data_sample {
168 } __attribute__ ((packed));
170 struct pda_pa_curve_data {
173 u8 points_per_channel;
176 } __attribute__ ((packed));
178 struct pda_rssi_cal_entry {
181 } __attribute__ ((packed));
187 } __attribute__ ((packed));
189 struct pda_custom_wrapper {
195 } __attribute__ ((packed));
198 * this defines the PDR codes used to build PDAs as defined in document
199 * number 553155. The current implementation mirrors version 1.1 of the
200 * document and lists only PDRs supported by the ARM platform.
203 /* common and choice range (0x0000 - 0x0fff) */
204 #define PDR_END 0x0000
205 #define PDR_MANUFACTURING_PART_NUMBER 0x0001
206 #define PDR_PDA_VERSION 0x0002
207 #define PDR_NIC_SERIAL_NUMBER 0x0003
209 #define PDR_MAC_ADDRESS 0x0101
210 #define PDR_REGULATORY_DOMAIN_LIST 0x0103
211 #define PDR_TEMPERATURE_TYPE 0x0107
213 #define PDR_PRISM_PCI_IDENTIFIER 0x0402
215 /* ARM range (0x1000 - 0x1fff) */
216 #define PDR_COUNTRY_INFORMATION 0x1000
217 #define PDR_INTERFACE_LIST 0x1001
218 #define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
219 #define PDR_OEM_NAME 0x1003
220 #define PDR_PRODUCT_NAME 0x1004
221 #define PDR_UTF8_OEM_NAME 0x1005
222 #define PDR_UTF8_PRODUCT_NAME 0x1006
223 #define PDR_COUNTRY_LIST 0x1007
224 #define PDR_DEFAULT_COUNTRY 0x1008
226 #define PDR_ANTENNA_GAIN 0x1100
228 #define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
229 #define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
230 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
231 #define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
232 #define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
233 #define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
234 #define PDR_REGULATORY_POWER_LIMITS 0x1907
235 #define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
236 #define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
237 #define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
239 /* reserved range (0x2000 - 0x7fff) */
241 /* customer range (0x8000 - 0xffff) */
242 #define PDR_BASEBAND_REGISTERS 0x8000
243 #define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
245 /* used by our modificated eeprom image */
246 #define PDR_RSSI_LINEAR_APPROXIMATION_CUSTOM 0xDEAD
247 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS_CUSTOM 0xBEEF
248 #define PDR_PRISM_PA_CAL_CURVE_DATA_CUSTOM 0xB05D
250 /* PDR definitions for default country & country list */
251 #define PDR_COUNTRY_CERT_CODE 0x80
252 #define PDR_COUNTRY_CERT_CODE_REAL 0x00
253 #define PDR_COUNTRY_CERT_CODE_PSEUDO 0x80
254 #define PDR_COUNTRY_CERT_BAND 0x40
255 #define PDR_COUNTRY_CERT_BAND_2GHZ 0x00
256 #define PDR_COUNTRY_CERT_BAND_5GHZ 0x40
257 #define PDR_COUNTRY_CERT_IODOOR 0x30
258 #define PDR_COUNTRY_CERT_IODOOR_BOTH 0x00
259 #define PDR_COUNTRY_CERT_IODOOR_INDOOR 0x20
260 #define PDR_COUNTRY_CERT_IODOOR_OUTDOOR 0x30
261 #define PDR_COUNTRY_CERT_INDEX 0x0F
263 struct p54_eeprom_lm86 {
278 } __attribute__ ((packed));
279 } __attribute__ ((packed));
281 enum p54_rx_decrypt_status {
282 P54_DECRYPT_NONE = 0,
285 P54_DECRYPT_NOMICHAEL,
286 P54_DECRYPT_NOCKIPMIC,
287 P54_DECRYPT_FAIL_WEP,
288 P54_DECRYPT_FAIL_TKIP,
289 P54_DECRYPT_FAIL_MICHAEL,
290 P54_DECRYPT_FAIL_CKIPKP,
291 P54_DECRYPT_FAIL_CKIPMIC,
292 P54_DECRYPT_FAIL_AESCCMP
308 } __attribute__ ((packed));
314 P54_TRAP_FAA_RADIO_ON,
315 P54_TRAP_FAA_RADIO_OFF,
326 } __attribute__ ((packed));
328 enum p54_frame_sent_status {
332 P54_TX_PSM_CANCELLED = 4
335 struct p54_frame_sent {
343 } __attribute__ ((packed));
345 enum p54_tx_data_crypt {
349 P54_CRYPTO_TKIPMICHAEL,
350 P54_CRYPTO_CCX_WEPMIC,
351 P54_CRYPTO_CCX_KPMIC,
356 enum p54_tx_data_queue {
357 P54_QUEUE_BEACON = 0,
358 P54_QUEUE_FWSCAN = 1,
363 P54_QUEUE_AC_NUM = 4,
388 } __attribute__ ((packed));
391 #define P54_TX_FRAME_LIFETIME 2000
392 #define P54_TX_TIMEOUT 4000
393 #define P54_STATISTICS_UPDATE 5000
395 #define P54_FILTER_TYPE_NONE 0
396 #define P54_FILTER_TYPE_STATION BIT(0)
397 #define P54_FILTER_TYPE_IBSS BIT(1)
398 #define P54_FILTER_TYPE_AP BIT(2)
399 #define P54_FILTER_TYPE_TRANSPARENT BIT(3)
400 #define P54_FILTER_TYPE_PROMISCUOUS BIT(4)
401 #define P54_FILTER_TYPE_HIBERNATE BIT(5)
402 #define P54_FILTER_TYPE_NOACK BIT(6)
403 #define P54_FILTER_TYPE_RX_DISABLED BIT(7)
405 struct p54_setup_mac {
407 u8 mac_addr[ETH_ALEN];
413 __le32 basic_rate_mask;
420 } v1 __attribute__ ((packed));
427 __le32 basic_rate_mask;
430 u8 rx_rssi_threshold;
433 __le16 lpf_bandwidth;
434 __le16 osc_start_delay;
435 } v2 __attribute__ ((packed));
436 } __attribute__ ((packed));
437 } __attribute__ ((packed));
439 #define P54_SETUP_V1_LEN 40
440 #define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))
442 #define P54_SCAN_EXIT BIT(0)
443 #define P54_SCAN_TRAP BIT(1)
444 #define P54_SCAN_ACTIVE BIT(2)
445 #define P54_SCAN_FILTER BIT(3)
451 struct pda_iq_autocal_entry iq_autocal;
452 u8 pa_points_per_curve;
458 struct p54_pa_curve_data_sample curve_data[8];
464 struct pda_rssi_cal_entry v1_rssi;
467 __le32 basic_rate_mask;
469 struct pda_rssi_cal_entry rssi;
470 } v2 __attribute__ ((packed));
471 } __attribute__ ((packed));
472 } __attribute__ ((packed));
474 #define P54_SCAN_V1_LEN 0x70
475 #define P54_SCAN_V2_LEN 0x7c
479 __le16 led_temporary;
480 __le16 led_permanent;
482 } __attribute__ ((packed));
489 struct p54_edcf_queue_param queue[8];
492 __le16 round_trip_delay;
493 } __attribute__ ((packed));
495 struct p54_statistics {
505 __le32 sample_noise[8];
508 } __attribute__ ((packed));
510 struct p54_xbow_synth {
515 } __attribute__ ((packed));
519 } __attribute__ ((packed));
521 struct p54_keycache {
529 } __attribute__ ((packed));
536 __le16 durations[32];
537 } __attribute__ ((packed));
539 struct p54_psm_interval {
542 } __attribute__ ((packed));
544 #define P54_PSM_CAM 0
545 #define P54_PSM BIT(0)
546 #define P54_PSM_DTIM BIT(1)
547 #define P54_PSM_MCBC BIT(2)
548 #define P54_PSM_CHECKSUM BIT(3)
549 #define P54_PSM_SKIP_MORE_DATA BIT(4)
550 #define P54_PSM_BEACON_TIMEOUT BIT(5)
551 #define P54_PSM_HFOSLEEP BIT(6)
552 #define P54_PSM_AUTOSWITCH_SLEEP BIT(7)
553 #define P54_PSM_LPIT BIT(8)
554 #define P54_PSM_BF_UCAST_SKIP BIT(9)
555 #define P54_PSM_BF_MCAST_SKIP BIT(10)
560 struct p54_psm_interval intervals[4];
561 u8 beacon_rssi_skip_max;
562 u8 rssi_delta_threshold;
565 } __attribute__ ((packed));
567 #define MC_FILTER_ADDRESS_NUM 4
569 struct p54_group_address_table {
570 __le16 filter_enable;
572 u8 mac_list[MC_FILTER_ADDRESS_NUM][ETH_ALEN];
573 } __attribute__ ((packed));
575 struct p54_txcancel {
577 } __attribute__ ((packed));
579 struct p54_sta_unlock {
582 } __attribute__ ((packed));
584 #define P54_TIM_CLEAR BIT(15)
589 } __attribute__ ((packed));
591 struct p54_cce_quiet {
593 } __attribute__ ((packed));
595 struct p54_bt_balancer {
598 } __attribute__ ((packed));
600 struct p54_arp_table {
601 __le16 filter_enable;
603 } __attribute__ ((packed));
605 #endif /* P54COMMON_H */