diff options
Diffstat (limited to 'drivers/net/wireless/p54/p54common.h')
-rw-r--r-- | drivers/net/wireless/p54/p54common.h | 124 |
1 files changed, 98 insertions, 26 deletions
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h index 8db6c0e8e540..2fa994cfcfed 100644 --- a/drivers/net/wireless/p54/p54common.h +++ b/drivers/net/wireless/p54/p54common.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef PRISM54COMMON_H | 1 | #ifndef P54COMMON_H |
2 | #define PRISM54COMMON_H | 2 | #define P54COMMON_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Common code specific definitions for mac80211 Prism54 drivers | 5 | * Common code specific definitions for mac80211 Prism54 drivers |
@@ -18,7 +18,8 @@ | |||
18 | struct bootrec { | 18 | struct bootrec { |
19 | __le32 code; | 19 | __le32 code; |
20 | __le32 len; | 20 | __le32 len; |
21 | u32 data[0]; | 21 | u32 data[10]; |
22 | __le16 rx_mtu; | ||
22 | } __attribute__((packed)); | 23 | } __attribute__((packed)); |
23 | 24 | ||
24 | struct bootrec_exp_if { | 25 | struct bootrec_exp_if { |
@@ -29,6 +30,17 @@ struct bootrec_exp_if { | |||
29 | __le16 top_compat; | 30 | __le16 top_compat; |
30 | } __attribute__((packed)); | 31 | } __attribute__((packed)); |
31 | 32 | ||
33 | struct bootrec_desc { | ||
34 | __le16 modes; | ||
35 | __le16 flags; | ||
36 | __le32 rx_start; | ||
37 | __le32 rx_end; | ||
38 | u8 headroom; | ||
39 | u8 tailroom; | ||
40 | u8 unimportant[6]; | ||
41 | u8 rates[16]; | ||
42 | } __attribute__((packed)); | ||
43 | |||
32 | #define BR_CODE_MIN 0x80000000 | 44 | #define BR_CODE_MIN 0x80000000 |
33 | #define BR_CODE_COMPONENT_ID 0x80000001 | 45 | #define BR_CODE_COMPONENT_ID 0x80000001 |
34 | #define BR_CODE_COMPONENT_VERSION 0x80000002 | 46 | #define BR_CODE_COMPONENT_VERSION 0x80000002 |
@@ -39,11 +51,6 @@ struct bootrec_exp_if { | |||
39 | #define BR_CODE_END_OF_BRA 0xFF0000FF | 51 | #define BR_CODE_END_OF_BRA 0xFF0000FF |
40 | #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF | 52 | #define LEGACY_BR_CODE_END_OF_BRA 0xFFFFFFFF |
41 | 53 | ||
42 | #define FW_FMAC 0x464d4143 | ||
43 | #define FW_LM86 0x4c4d3836 | ||
44 | #define FW_LM87 0x4c4d3837 | ||
45 | #define FW_LM20 0x4c4d3230 | ||
46 | |||
47 | /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */ | 54 | /* PDA defines are Copyright (C) 2005 Nokia Corporation (taken from islsm_pda.h) */ |
48 | 55 | ||
49 | struct pda_entry { | 56 | struct pda_entry { |
@@ -89,6 +96,16 @@ struct pda_pa_curve_data_sample_rev1 { | |||
89 | u8 data_qpsk; | 96 | u8 data_qpsk; |
90 | u8 data_16qam; | 97 | u8 data_16qam; |
91 | u8 data_64qam; | 98 | u8 data_64qam; |
99 | } __attribute__ ((packed)); | ||
100 | |||
101 | struct p54_pa_curve_data_sample { | ||
102 | u8 rf_power; | ||
103 | u8 pa_detector; | ||
104 | u8 data_barker; | ||
105 | u8 data_bpsk; | ||
106 | u8 data_qpsk; | ||
107 | u8 data_16qam; | ||
108 | u8 data_64qam; | ||
92 | u8 padding; | 109 | u8 padding; |
93 | } __attribute__ ((packed)); | 110 | } __attribute__ ((packed)); |
94 | 111 | ||
@@ -169,8 +186,9 @@ struct p54_rx_hdr { | |||
169 | u8 rssi; | 186 | u8 rssi; |
170 | u8 quality; | 187 | u8 quality; |
171 | u16 unknown2; | 188 | u16 unknown2; |
172 | __le64 timestamp; | 189 | __le32 tsf32; |
173 | u8 data[0]; | 190 | __le32 unalloc0; |
191 | u8 align[0]; | ||
174 | } __attribute__ ((packed)); | 192 | } __attribute__ ((packed)); |
175 | 193 | ||
176 | struct p54_frame_sent_hdr { | 194 | struct p54_frame_sent_hdr { |
@@ -198,22 +216,37 @@ struct p54_tx_control_allocdata { | |||
198 | 216 | ||
199 | struct p54_tx_control_filter { | 217 | struct p54_tx_control_filter { |
200 | __le16 filter_type; | 218 | __le16 filter_type; |
201 | u8 dst[ETH_ALEN]; | 219 | u8 mac_addr[ETH_ALEN]; |
202 | u8 src[ETH_ALEN]; | 220 | u8 bssid[ETH_ALEN]; |
203 | u8 antenna; | 221 | u8 rx_antenna; |
204 | u8 debug; | 222 | u8 rx_align; |
205 | __le32 magic3; | 223 | union { |
206 | u8 rates[8]; // FIXME: what's this for? | 224 | struct { |
207 | __le32 rx_addr; | 225 | __le32 basic_rate_mask; |
208 | __le16 max_rx; | 226 | u8 rts_rates[8]; |
209 | __le16 rxhw; | 227 | __le32 rx_addr; |
210 | __le16 magic8; | 228 | __le16 max_rx; |
211 | __le16 magic9; | 229 | __le16 rxhw; |
230 | __le16 wakeup_timer; | ||
231 | __le16 unalloc0; | ||
232 | } v1 __attribute__ ((packed)); | ||
233 | struct { | ||
234 | __le32 rx_addr; | ||
235 | __le16 max_rx; | ||
236 | __le16 rxhw; | ||
237 | __le16 timer; | ||
238 | __le16 unalloc0; | ||
239 | __le32 unalloc1; | ||
240 | } v2 __attribute__ ((packed)); | ||
241 | } __attribute__ ((packed)); | ||
212 | } __attribute__ ((packed)); | 242 | } __attribute__ ((packed)); |
213 | 243 | ||
244 | #define P54_TX_CONTROL_FILTER_V1_LEN (sizeof(struct p54_tx_control_filter)) | ||
245 | #define P54_TX_CONTROL_FILTER_V2_LEN (sizeof(struct p54_tx_control_filter)-8) | ||
246 | |||
214 | struct p54_tx_control_channel { | 247 | struct p54_tx_control_channel { |
215 | __le16 magic1; | 248 | __le16 flags; |
216 | __le16 magic2; | 249 | __le16 dwell; |
217 | u8 padding1[20]; | 250 | u8 padding1[20]; |
218 | struct pda_iq_autocal_entry iq_autocal; | 251 | struct pda_iq_autocal_entry iq_autocal; |
219 | u8 pa_points_per_curve; | 252 | u8 pa_points_per_curve; |
@@ -222,10 +255,29 @@ struct p54_tx_control_channel { | |||
222 | u8 val_qpsk; | 255 | u8 val_qpsk; |
223 | u8 val_16qam; | 256 | u8 val_16qam; |
224 | u8 val_64qam; | 257 | u8 val_64qam; |
225 | struct pda_pa_curve_data_sample_rev1 curve_data[0]; | 258 | struct p54_pa_curve_data_sample curve_data[8]; |
226 | /* additional padding/data after curve_data */ | 259 | u8 dup_bpsk; |
260 | u8 dup_qpsk; | ||
261 | u8 dup_16qam; | ||
262 | u8 dup_64qam; | ||
263 | union { | ||
264 | struct { | ||
265 | __le16 rssical_mul; | ||
266 | __le16 rssical_add; | ||
267 | } v1 __attribute__ ((packed)); | ||
268 | |||
269 | struct { | ||
270 | __le32 basic_rate_mask; | ||
271 | u8 rts_rates[8]; | ||
272 | __le16 rssical_mul; | ||
273 | __le16 rssical_add; | ||
274 | } v2 __attribute__ ((packed)); | ||
275 | } __attribute__ ((packed)); | ||
227 | } __attribute__ ((packed)); | 276 | } __attribute__ ((packed)); |
228 | 277 | ||
278 | #define P54_TX_CONTROL_CHANNEL_V1_LEN (sizeof(struct p54_tx_control_channel)-12) | ||
279 | #define P54_TX_CONTROL_CHANNEL_V2_LEN (sizeof(struct p54_tx_control_channel)) | ||
280 | |||
229 | struct p54_tx_control_led { | 281 | struct p54_tx_control_led { |
230 | __le16 mode; | 282 | __le16 mode; |
231 | __le16 led_temporary; | 283 | __le16 led_temporary; |
@@ -250,4 +302,24 @@ struct p54_tx_control_vdcf { | |||
250 | __le16 frameburst; | 302 | __le16 frameburst; |
251 | } __attribute__ ((packed)); | 303 | } __attribute__ ((packed)); |
252 | 304 | ||
253 | #endif /* PRISM54COMMON_H */ | 305 | struct p54_statistics { |
306 | __le32 rx_success; | ||
307 | __le32 rx_bad_fcs; | ||
308 | __le32 rx_abort; | ||
309 | __le32 rx_abort_phy; | ||
310 | __le32 rts_success; | ||
311 | __le32 rts_fail; | ||
312 | __le32 tsf32; | ||
313 | __le32 airtime; | ||
314 | __le32 noise; | ||
315 | __le32 unkn[10]; /* CCE / CCA / RADAR */ | ||
316 | } __attribute__ ((packed)); | ||
317 | |||
318 | struct p54_tx_control_xbow_synth { | ||
319 | __le16 magic1; | ||
320 | __le16 magic2; | ||
321 | __le16 freq; | ||
322 | u32 padding[5]; | ||
323 | } __attribute__ ((packed)); | ||
324 | |||
325 | #endif /* P54COMMON_H */ | ||