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 0x0001
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_CONTROL BIT(15)
88 #define P54_HDR_FLAG_CONTROL_OPSET (BIT(15) + BIT(0))
90 #define P54_HDR_FLAG_DATA_ALIGN BIT(14)
91 #define P54_HDR_FLAG_DATA_OUT_PROMISC BIT(0)
92 #define P54_HDR_FLAG_DATA_OUT_TIMESTAMP BIT(1)
93 #define P54_HDR_FLAG_DATA_OUT_SEQNR BIT(2)
94 #define P54_HDR_FLAG_DATA_OUT_BIT3 BIT(3)
95 #define P54_HDR_FLAG_DATA_OUT_BURST BIT(4)
96 #define P54_HDR_FLAG_DATA_OUT_NOCANCEL BIT(5)
97 #define P54_HDR_FLAG_DATA_OUT_CLEARTIM BIT(6)
98 #define P54_HDR_FLAG_DATA_OUT_HITCHHIKE BIT(7)
99 #define P54_HDR_FLAG_DATA_OUT_COMPRESS BIT(8)
100 #define P54_HDR_FLAG_DATA_OUT_CONCAT BIT(9)
101 #define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT BIT(10)
102 #define P54_HDR_FLAG_DATA_OUT_WAITEOSP BIT(11)
104 #define P54_HDR_FLAG_DATA_IN_FCS_GOOD BIT(0)
105 #define P54_HDR_FLAG_DATA_IN_MATCH_MAC BIT(1)
106 #define P54_HDR_FLAG_DATA_IN_MCBC BIT(2)
107 #define P54_HDR_FLAG_DATA_IN_BEACON BIT(3)
108 #define P54_HDR_FLAG_DATA_IN_MATCH_BSS BIT(4)
109 #define P54_HDR_FLAG_DATA_IN_BCAST_BSS BIT(5)
110 #define P54_HDR_FLAG_DATA_IN_DATA BIT(6)
111 #define P54_HDR_FLAG_DATA_IN_TRUNCATED BIT(7)
112 #define P54_HDR_FLAG_DATA_IN_BIT8 BIT(8)
113 #define P54_HDR_FLAG_DATA_IN_TRANSPARENT BIT(9)
115 /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
118 __le16 len; /* includes both code and data */
121 } __attribute__ ((packed));
123 struct eeprom_pda_wrap {
129 } __attribute__ ((packed));
131 struct pda_iq_autocal_entry {
134 } __attribute__ ((packed));
136 struct pda_channel_output_limit {
144 } __attribute__ ((packed));
146 struct pda_pa_curve_data_sample_rev0 {
150 } __attribute__ ((packed));
152 struct pda_pa_curve_data_sample_rev1 {
160 } __attribute__ ((packed));
162 struct p54_pa_curve_data_sample {
171 } __attribute__ ((packed));
173 struct pda_pa_curve_data {
176 u8 points_per_channel;
179 } __attribute__ ((packed));
182 * this defines the PDR codes used to build PDAs as defined in document
183 * number 553155. The current implementation mirrors version 1.1 of the
184 * document and lists only PDRs supported by the ARM platform.
187 /* common and choice range (0x0000 - 0x0fff) */
188 #define PDR_END 0x0000
189 #define PDR_MANUFACTURING_PART_NUMBER 0x0001
190 #define PDR_PDA_VERSION 0x0002
191 #define PDR_NIC_SERIAL_NUMBER 0x0003
193 #define PDR_MAC_ADDRESS 0x0101
194 #define PDR_REGULATORY_DOMAIN_LIST 0x0103
195 #define PDR_TEMPERATURE_TYPE 0x0107
197 #define PDR_PRISM_PCI_IDENTIFIER 0x0402
199 /* ARM range (0x1000 - 0x1fff) */
200 #define PDR_COUNTRY_INFORMATION 0x1000
201 #define PDR_INTERFACE_LIST 0x1001
202 #define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
203 #define PDR_OEM_NAME 0x1003
204 #define PDR_PRODUCT_NAME 0x1004
205 #define PDR_UTF8_OEM_NAME 0x1005
206 #define PDR_UTF8_PRODUCT_NAME 0x1006
207 #define PDR_COUNTRY_LIST 0x1007
208 #define PDR_DEFAULT_COUNTRY 0x1008
210 #define PDR_ANTENNA_GAIN 0x1100
212 #define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
213 #define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
214 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
215 #define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
216 #define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
217 #define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
218 #define PDR_REGULATORY_POWER_LIMITS 0x1907
219 #define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
220 #define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
221 #define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
223 /* reserved range (0x2000 - 0x7fff) */
225 /* customer range (0x8000 - 0xffff) */
226 #define PDR_BASEBAND_REGISTERS 0x8000
227 #define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
229 /* PDR definitions for default country & country list */
230 #define PDR_COUNTRY_CERT_CODE 0x80
231 #define PDR_COUNTRY_CERT_CODE_REAL 0x00
232 #define PDR_COUNTRY_CERT_CODE_PSEUDO 0x80
233 #define PDR_COUNTRY_CERT_BAND 0x40
234 #define PDR_COUNTRY_CERT_BAND_2GHZ 0x00
235 #define PDR_COUNTRY_CERT_BAND_5GHZ 0x40
236 #define PDR_COUNTRY_CERT_IODOOR 0x30
237 #define PDR_COUNTRY_CERT_IODOOR_BOTH 0x00
238 #define PDR_COUNTRY_CERT_IODOOR_INDOOR 0x20
239 #define PDR_COUNTRY_CERT_IODOOR_OUTDOOR 0x30
240 #define PDR_COUNTRY_CERT_INDEX 0x0F
242 /* stored in skb->cb */
248 struct p54_eeprom_lm86 {
263 } __attribute__ ((packed));
264 } __attribute__ ((packed));
266 enum p54_rx_decrypt_status {
267 P54_DECRYPT_NONE = 0,
270 P54_DECRYPT_NOMICHAEL,
271 P54_DECRYPT_NOCKIPMIC,
272 P54_DECRYPT_FAIL_WEP,
273 P54_DECRYPT_FAIL_TKIP,
274 P54_DECRYPT_FAIL_MICHAEL,
275 P54_DECRYPT_FAIL_CKIPKP,
276 P54_DECRYPT_FAIL_CKIPMIC,
277 P54_DECRYPT_FAIL_AESCCMP
293 } __attribute__ ((packed));
299 P54_TRAP_FAA_RADIO_ON,
300 P54_TRAP_FAA_RADIO_OFF,
311 } __attribute__ ((packed));
313 enum p54_frame_sent_status {
317 P54_TX_PSM_CANCELLED = 4
320 struct p54_frame_sent {
328 } __attribute__ ((packed));
330 enum p54_tx_data_crypt {
334 P54_CRYPTO_TKIPMICHAEL,
335 P54_CRYPTO_CCX_WEPMIC,
336 P54_CRYPTO_CCX_KPMIC,
356 } __attribute__ ((packed));
358 #define P54_FILTER_TYPE_NONE 0
359 #define P54_FILTER_TYPE_STATION BIT(0)
360 #define P54_FILTER_TYPE_IBSS BIT(1)
361 #define P54_FILTER_TYPE_AP BIT(2)
362 #define P54_FILTER_TYPE_TRANSPARENT BIT(3)
363 #define P54_FILTER_TYPE_PROMISCUOUS BIT(4)
364 #define P54_FILTER_TYPE_HIBERNATE BIT(5)
365 #define P54_FILTER_TYPE_NOACK BIT(6)
366 #define P54_FILTER_TYPE_RX_DISABLED BIT(7)
368 struct p54_setup_mac {
370 u8 mac_addr[ETH_ALEN];
376 __le32 basic_rate_mask;
383 } v1 __attribute__ ((packed));
390 __le32 basic_rate_mask;
393 u8 rx_rssi_threshold;
396 __le16 lpf_bandwidth;
397 __le16 osc_start_delay;
398 } v2 __attribute__ ((packed));
399 } __attribute__ ((packed));
400 } __attribute__ ((packed));
402 #define P54_SETUP_V1_LEN 40
403 #define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))
405 #define P54_SCAN_EXIT BIT(0)
406 #define P54_SCAN_TRAP BIT(1)
407 #define P54_SCAN_ACTIVE BIT(2)
408 #define P54_SCAN_FILTER BIT(3)
414 struct pda_iq_autocal_entry iq_autocal;
415 u8 pa_points_per_curve;
421 struct p54_pa_curve_data_sample curve_data[8];
430 } v1 __attribute__ ((packed));
433 __le32 basic_rate_mask;
437 } v2 __attribute__ ((packed));
438 } __attribute__ ((packed));
439 } __attribute__ ((packed));
441 #define P54_SCAN_V1_LEN (sizeof(struct p54_scan)-12)
442 #define P54_SCAN_V2_LEN (sizeof(struct p54_scan))
446 __le16 led_temporary;
447 __le16 led_permanent;
449 } __attribute__ ((packed));
456 struct p54_edcf_queue_param queue[8];
459 __le16 round_trip_delay;
460 } __attribute__ ((packed));
462 struct p54_statistics {
472 __le32 sample_noise[8];
475 } __attribute__ ((packed));
477 struct p54_xbow_synth {
482 } __attribute__ ((packed));
486 } __attribute__ ((packed));
488 struct p54_keycache {
496 } __attribute__ ((packed));
503 __le16 durations[32];
504 } __attribute__ ((packed));
506 struct p54_psm_interval {
509 } __attribute__ ((packed));
511 #define P54_PSM BIT(0)
512 #define P54_PSM_DTIM BIT(1)
513 #define P54_PSM_MCBC BIT(2)
514 #define P54_PSM_CHECKSUM BIT(3)
515 #define P54_PSM_SKIP_MORE_DATA BIT(4)
516 #define P54_PSM_BEACON_TIMEOUT BIT(5)
517 #define P54_PSM_HFOSLEEP BIT(6)
518 #define P54_PSM_AUTOSWITCH_SLEEP BIT(7)
519 #define P54_PSM_LPIT BIT(8)
520 #define P54_PSM_BF_UCAST_SKIP BIT(9)
521 #define P54_PSM_BF_MCAST_SKIP BIT(10)
526 struct p54_psm_interval intervals[4];
527 u8 beacon_rssi_skip_max;
528 u8 rssi_delta_threshold;
531 } __attribute__ ((packed));
533 #define MC_FILTER_ADDRESS_NUM 4
535 struct p54_group_address_table {
536 __le16 filter_enable;
538 u8 mac_list[MC_FILTER_ADDRESS_NUM][ETH_ALEN];
539 } __attribute__ ((packed));
541 struct p54_txcancel {
543 } __attribute__ ((packed));
545 struct p54_sta_unlock {
548 } __attribute__ ((packed));
550 #define P54_TIM_CLEAR BIT(15)
555 } __attribute__ ((packed));
557 struct p54_cce_quiet {
559 } __attribute__ ((packed));
561 struct p54_bt_balancer {
564 } __attribute__ ((packed));
566 struct p54_arp_table {
567 __le16 filter_enable;
569 } __attribute__ ((packed));
571 #endif /* P54COMMON_H */