1 #ifndef PRISM54COMMON_H
2 #define PRISM54COMMON_H
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>
10 * Based on the islsm (softmac prism54) driver, which is:
11 * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
22 } __attribute__((packed));
24 struct bootrec_exp_if {
30 } __attribute__((packed));
32 #define BR_CODE_MIN 0x80000000
33 #define BR_CODE_COMPONENT_ID 0x80000001
34 #define BR_CODE_COMPONENT_VERSION 0x80000002
35 #define BR_CODE_DEPENDENT_IF 0x80000003
36 #define BR_CODE_EXPOSED_IF 0x80000004
37 #define BR_CODE_DESCR 0x80000101
38 #define BR_CODE_MAX 0x8FFFFFFF
39 #define BR_CODE_END_OF_BRA 0xFF0000FF
40 #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF
42 #define FW_FMAC 0x464d4143
43 #define FW_LM86 0x4c4d3836
44 #define FW_LM87 0x4c4d3837
45 #define FW_LM20 0x4c4d3230
47 /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */
50 __le16 len; /* includes both code and data */
53 } __attribute__ ((packed));
55 struct eeprom_pda_wrap {
61 } __attribute__ ((packed));
63 struct pda_iq_autocal_entry {
66 } __attribute__ ((packed));
68 struct pda_channel_output_limit {
76 } __attribute__ ((packed));
78 struct pda_pa_curve_data_sample_rev0 {
82 } __attribute__ ((packed));
84 struct pda_pa_curve_data_sample_rev1 {
93 } __attribute__ ((packed));
95 struct pda_pa_curve_data {
98 u8 points_per_channel;
101 } __attribute__ ((packed));
104 * this defines the PDR codes used to build PDAs as defined in document
105 * number 553155. The current implementation mirrors version 1.1 of the
106 * document and lists only PDRs supported by the ARM platform.
109 /* common and choice range (0x0000 - 0x0fff) */
110 #define PDR_END 0x0000
111 #define PDR_MANUFACTURING_PART_NUMBER 0x0001
112 #define PDR_PDA_VERSION 0x0002
113 #define PDR_NIC_SERIAL_NUMBER 0x0003
115 #define PDR_MAC_ADDRESS 0x0101
116 #define PDR_REGULATORY_DOMAIN_LIST 0x0103
117 #define PDR_TEMPERATURE_TYPE 0x0107
119 #define PDR_PRISM_PCI_IDENTIFIER 0x0402
121 /* ARM range (0x1000 - 0x1fff) */
122 #define PDR_COUNTRY_INFORMATION 0x1000
123 #define PDR_INTERFACE_LIST 0x1001
124 #define PDR_HARDWARE_PLATFORM_COMPONENT_ID 0x1002
125 #define PDR_OEM_NAME 0x1003
126 #define PDR_PRODUCT_NAME 0x1004
127 #define PDR_UTF8_OEM_NAME 0x1005
128 #define PDR_UTF8_PRODUCT_NAME 0x1006
129 #define PDR_COUNTRY_LIST 0x1007
130 #define PDR_DEFAULT_COUNTRY 0x1008
132 #define PDR_ANTENNA_GAIN 0x1100
134 #define PDR_PRISM_INDIGO_PA_CALIBRATION_DATA 0x1901
135 #define PDR_RSSI_LINEAR_APPROXIMATION 0x1902
136 #define PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS 0x1903
137 #define PDR_PRISM_PA_CAL_CURVE_DATA 0x1904
138 #define PDR_RSSI_LINEAR_APPROXIMATION_DUAL_BAND 0x1905
139 #define PDR_PRISM_ZIF_TX_IQ_CALIBRATION 0x1906
140 #define PDR_REGULATORY_POWER_LIMITS 0x1907
141 #define PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED 0x1908
142 #define PDR_RADIATED_TRANSMISSION_CORRECTION 0x1909
143 #define PDR_PRISM_TX_IQ_CALIBRATION 0x190a
145 /* reserved range (0x2000 - 0x7fff) */
147 /* customer range (0x8000 - 0xffff) */
148 #define PDR_BASEBAND_REGISTERS 0x8000
149 #define PDR_PER_CHANNEL_BASEBAND_REGISTERS 0x8001
151 /* stored in skb->cb */
155 struct ieee80211_tx_control *control;
158 struct p54_eeprom_lm86 {
162 } __attribute__ ((packed));
175 } __attribute__ ((packed));
177 struct p54_frame_sent_hdr {
183 } __attribute__ ((packed));
185 struct p54_tx_control_allocdata {
198 } __attribute__ ((packed));
200 struct p54_tx_control_filter {
207 u8 rates[8]; // FIXME: what's this for?
213 } __attribute__ ((packed));
215 struct p54_tx_control_channel {
219 struct pda_iq_autocal_entry iq_autocal;
220 u8 pa_points_per_curve;
226 struct pda_pa_curve_data_sample_rev1 curve_data[0];
227 /* additional padding/data after curve_data */
228 } __attribute__ ((packed));
230 struct p54_tx_control_led {
232 __le16 led_temporary;
233 __le16 led_permanent;
235 } __attribute__ ((packed));
237 struct p54_tx_vdcf_queues {
242 } __attribute__ ((packed));
244 struct p54_tx_control_vdcf {
249 struct p54_tx_vdcf_queues queue[8];
252 } __attribute__ ((packed));
254 static const struct ieee80211_rate p54_rates[] = {
258 .flags = IEEE80211_RATE_CCK_2 },
262 .flags = IEEE80211_RATE_CCK_2 },
266 .flags = IEEE80211_RATE_CCK_2 },
270 .flags = IEEE80211_RATE_CCK_2 },
273 .flags = IEEE80211_RATE_OFDM },
276 .flags = IEEE80211_RATE_OFDM },
279 .flags = IEEE80211_RATE_OFDM },
282 .flags = IEEE80211_RATE_OFDM },
285 .flags = IEEE80211_RATE_OFDM },
288 .flags = IEEE80211_RATE_OFDM },
291 .flags = IEEE80211_RATE_OFDM },
294 .flags = IEEE80211_RATE_OFDM },
297 // TODO: just generate this..
298 static const struct ieee80211_channel p54_channels[] = {
329 #endif /* PRISM54COMMON_H */