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 struct bootrec_exp_if {
34 } __attribute__((packed));
36 #define BR_DESC_PRIV_CAP_WEP BIT(0)
37 #define BR_DESC_PRIV_CAP_TKIP BIT(1)
38 #define BR_DESC_PRIV_CAP_MICHAEL BIT(2)
39 #define BR_DESC_PRIV_CAP_CCX_CP BIT(3)
40 #define BR_DESC_PRIV_CAP_CCX_MIC BIT(4)
41 #define BR_DESC_PRIV_CAP_AESCCMP BIT(5)
59 } __attribute__((packed));
61 #define BR_CODE_MIN 0x80000000
62 #define BR_CODE_COMPONENT_ID 0x80000001
63 #define BR_CODE_COMPONENT_VERSION 0x80000002
64 #define BR_CODE_DEPENDENT_IF 0x80000003
65 #define BR_CODE_EXPOSED_IF 0x80000004
66 #define BR_CODE_DESCR 0x80000101
67 #define BR_CODE_MAX 0x8FFFFFFF
68 #define BR_CODE_END_OF_BRA 0xFF0000FF
69 #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF
71 #define P54_HDR_FLAG_CONTROL BIT(15)
72 #define P54_HDR_FLAG_CONTROL_OPSET (BIT(15) + BIT(0))
74 #define P54_HDR_FLAG_DATA_ALIGN BIT(14)
75 #define P54_HDR_FLAG_DATA_OUT_PROMISC BIT(0)
76 #define P54_HDR_FLAG_DATA_OUT_TIMESTAMP BIT(1)
77 #define P54_HDR_FLAG_DATA_OUT_SEQNR BIT(2)
78 #define P54_HDR_FLAG_DATA_OUT_BIT3 BIT(3)
79 #define P54_HDR_FLAG_DATA_OUT_BURST BIT(4)
80 #define P54_HDR_FLAG_DATA_OUT_NOCANCEL BIT(5)
81 #define P54_HDR_FLAG_DATA_OUT_CLEARTIM BIT(6)
82 #define P54_HDR_FLAG_DATA_OUT_HITCHHIKE BIT(7)
83 #define P54_HDR_FLAG_DATA_OUT_COMPRESS BIT(8)
84 #define P54_HDR_FLAG_DATA_OUT_CONCAT BIT(9)
85 #define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT BIT(10)
86 #define P54_HDR_FLAG_DATA_OUT_WAITEOSP BIT(11)
88 #define P54_HDR_FLAG_DATA_IN_FCS_GOOD BIT(0)
89 #define P54_HDR_FLAG_DATA_IN_MATCH_MAC BIT(1)
90 #define P54_HDR_FLAG_DATA_IN_MCBC BIT(2)
91 #define P54_HDR_FLAG_DATA_IN_BEACON BIT(3)
92 #define P54_HDR_FLAG_DATA_IN_MATCH_BSS BIT(4)
93 #define P54_HDR_FLAG_DATA_IN_BCAST_BSS BIT(5)
94 #define P54_HDR_FLAG_DATA_IN_DATA BIT(6)
95 #define P54_HDR_FLAG_DATA_IN_TRUNCATED BIT(7)
96 #define P54_HDR_FLAG_DATA_IN_BIT8 BIT(8)
97 #define P54_HDR_FLAG_DATA_IN_TRANSPARENT BIT(9)
99 /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
102 __le16 len; /* includes both code and data */
105 } __attribute__ ((packed));
107 struct eeprom_pda_wrap {
113 } __attribute__ ((packed));
115 struct pda_iq_autocal_entry {
118 } __attribute__ ((packed));
120 struct pda_channel_output_limit {
128 } __attribute__ ((packed));
130 struct pda_pa_curve_data_sample_rev0 {
134 } __attribute__ ((packed));
136 struct pda_pa_curve_data_sample_rev1 {
144 } __attribute__ ((packed));
146 struct p54_pa_curve_data_sample {
155 } __attribute__ ((packed));
157 struct pda_pa_curve_data {
160 u8 points_per_channel;
163 } __attribute__ ((packed));
166 * this defines the PDR codes used to build PDAs as defined in document
167 * number 553155. The current implementation mirrors version 1.1 of the
168 * document and lists only PDRs supported by the ARM platform.
171 /* common and choice range (0x0000 - 0x0fff) */
172 #define PDR_END 0x0000
173 #define PDR_MANUFACTURING_PART_NUMBER 0x0001
174 #define PDR_PDA_VERSION 0x0002
175 #define PDR_NIC_SERIAL_NUMBER 0x0003
177 #define PDR_MAC_ADDRESS 0x0101
178 #define PDR_REGULATORY_DOMAIN_LIST 0x0103
179 #define PDR_TEMPERATURE_TYPE 0x0107
181 #define PDR_PRISM_PCI_IDENTIFIER 0x0402
183 /* ARM range (0x1000 - 0x1fff) */
184 #define PDR_COUNTRY_INFORMATION 0x1000
185 #define PDR_INTERFACE_LIST 0x1001
186 #define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
187 #define PDR_OEM_NAME 0x1003
188 #define PDR_PRODUCT_NAME 0x1004
189 #define PDR_UTF8_OEM_NAME 0x1005
190 #define PDR_UTF8_PRODUCT_NAME 0x1006
191 #define PDR_COUNTRY_LIST 0x1007
192 #define PDR_DEFAULT_COUNTRY 0x1008
194 #define PDR_ANTENNA_GAIN 0x1100
196 #define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
197 #define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
198 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
199 #define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
200 #define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
201 #define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
202 #define PDR_REGULATORY_POWER_LIMITS 0x1907
203 #define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
204 #define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
205 #define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
207 /* reserved range (0x2000 - 0x7fff) */
209 /* customer range (0x8000 - 0xffff) */
210 #define PDR_BASEBAND_REGISTERS 0x8000
211 #define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
213 /* stored in skb->cb */
219 struct p54_eeprom_lm86 {
223 } __attribute__ ((packed));
225 enum p54_rx_decrypt_status {
226 P54_DECRYPT_NONE = 0,
229 P54_DECRYPT_NOMICHAEL,
230 P54_DECRYPT_NOCKIPMIC,
231 P54_DECRYPT_FAIL_WEP,
232 P54_DECRYPT_FAIL_TKIP,
233 P54_DECRYPT_FAIL_MICAHEL,
234 P54_DECRYPT_FAIL_CKIPKP,
235 P54_DECRYPT_FAIL_CKIPMIC,
236 P54_DECRYPT_FAIL_AESCCMP
252 } __attribute__ ((packed));
258 P54_TRAP_FAA_RADIO_ON,
259 P54_TRAP_FAA_RADIO_OFF,
270 } __attribute__ ((packed));
272 enum p54_frame_sent_status {
279 struct p54_frame_sent {
287 } __attribute__ ((packed));
289 enum p54_tx_data_crypt {
293 P54_CRYPTO_TKIPMICHAEL,
294 P54_CRYPTO_CCX_WEPMIC,
295 P54_CRYPTO_CCX_KPMIC,
315 } __attribute__ ((packed));
317 #define P54_FILTER_TYPE_NONE 0
318 #define P54_FILTER_TYPE_STATION BIT(0)
319 #define P54_FILTER_TYPE_IBSS BIT(1)
320 #define P54_FILTER_TYPE_AP BIT(2)
321 #define P54_FILTER_TYPE_TRANSPARENT BIT(3)
322 #define P54_FILTER_TYPE_PROMISCUOUS BIT(4)
323 #define P54_FILTER_TYPE_HIBERNATE BIT(5)
324 #define P54_FILTER_TYPE_NOACK BIT(6)
325 #define P54_FILTER_TYPE_RX_DISABLED BIT(7)
327 struct p54_setup_mac {
329 u8 mac_addr[ETH_ALEN];
335 __le32 basic_rate_mask;
342 } v1 __attribute__ ((packed));
349 __le32 basic_rate_mask;
352 u8 rx_rssi_threshold;
355 __le16 lpf_bandwidth;
356 __le16 osc_start_delay;
357 } v2 __attribute__ ((packed));
358 } __attribute__ ((packed));
359 } __attribute__ ((packed));
361 #define P54_SETUP_V1_LEN 40
362 #define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))
364 #define P54_SCAN_EXIT BIT(0)
365 #define P54_SCAN_TRAP BIT(1)
366 #define P54_SCAN_ACTIVE BIT(2)
367 #define P54_SCAN_FILTER BIT(3)
373 struct pda_iq_autocal_entry iq_autocal;
374 u8 pa_points_per_curve;
380 struct p54_pa_curve_data_sample curve_data[8];
389 } v1 __attribute__ ((packed));
392 __le32 basic_rate_mask;
396 } v2 __attribute__ ((packed));
397 } __attribute__ ((packed));
398 } __attribute__ ((packed));
400 #define P54_SCAN_V1_LEN (sizeof(struct p54_scan)-12)
401 #define P54_SCAN_V2_LEN (sizeof(struct p54_scan))
405 __le16 led_temporary;
406 __le16 led_permanent;
408 } __attribute__ ((packed));
415 struct p54_edcf_queue_param queue[8];
418 __le16 round_trip_delay;
419 } __attribute__ ((packed));
421 struct p54_statistics {
431 __le32 sample_noise[8];
434 } __attribute__ ((packed));
436 struct p54_xbow_synth {
441 } __attribute__ ((packed));
445 } __attribute__ ((packed));
447 struct p54_keycache {
455 } __attribute__ ((packed));
462 __le16 durations[32];
463 } __attribute__ ((packed));
465 struct p54_psm_interval {
468 } __attribute__ ((packed));
470 #define P54_PSM BIT(0)
471 #define P54_PSM_DTIM BIT(1)
472 #define P54_PSM_MCBC BIT(2)
473 #define P54_PSM_CHECKSUM BIT(3)
474 #define P54_PSM_SKIP_MORE_DATA BIT(4)
475 #define P54_PSM_BEACON_TIMEOUT BIT(5)
476 #define P54_PSM_HFOSLEEP BIT(6)
477 #define P54_PSM_AUTOSWITCH_SLEEP BIT(7)
478 #define P54_PSM_LPIT BIT(8)
479 #define P54_PSM_BF_UCAST_SKIP BIT(9)
480 #define P54_PSM_BF_MCAST_SKIP BIT(10)
485 struct p54_psm_interval intervals[4];
486 u8 beacon_rssi_skip_max;
487 u8 rssi_delta_threshold;
490 } __attribute__ ((packed));
492 #define MC_FILTER_ADDRESS_NUM 4
494 struct p54_group_address_table {
495 __le16 filter_enable;
497 u8 mac_list[MC_FILTER_ADDRESS_NUM][ETH_ALEN];
498 } __attribute__ ((packed));
500 struct p54_txcancel {
502 } __attribute__ ((packed));
504 struct p54_sta_unlock {
507 } __attribute__ ((packed));
509 #define P54_TIM_CLEAR BIT(15)
510 struct p54_tx_control_tim {
514 } __attribute__ ((packed));
516 struct p54_cce_quiet {
518 } __attribute__ ((packed));
520 struct p54_bt_balancer {
523 } __attribute__ ((packed));
525 struct p54_arp_table {
526 __le16 filter_enable;
528 } __attribute__ ((packed));
530 #endif /* P54COMMON_H */