diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-01-10 19:14:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:24 -0500 |
commit | 6917f506a03b6bd7389683e8a8e08a1ad977b33e (patch) | |
tree | 1a5ed1755ae86666eea587a2c942984f9444932c /drivers/net/wireless/p54/p54common.h | |
parent | 83cf1b6edba6bde87c8cf852b182d44b12ae7f88 (diff) |
p54: longbow frontend support
This patch adds support for longbow RF chip.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.h')
-rw-r--r-- | drivers/net/wireless/p54/p54common.h | 72 |
1 files changed, 56 insertions, 16 deletions
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h index d9aa255b4717..def23b1f49ec 100644 --- a/drivers/net/wireless/p54/p54common.h +++ b/drivers/net/wireless/p54/p54common.h | |||
@@ -26,6 +26,11 @@ struct bootrec { | |||
26 | } __attribute__((packed)); | 26 | } __attribute__((packed)); |
27 | 27 | ||
28 | #define PDR_SYNTH_FRONTEND_MASK 0x0007 | 28 | #define PDR_SYNTH_FRONTEND_MASK 0x0007 |
29 | #define PDR_SYNTH_FRONTEND_DUETTE3 0x0001 | ||
30 | #define PDR_SYNTH_FRONTEND_DUETTE2 0x0002 | ||
31 | #define PDR_SYNTH_FRONTEND_FRISBEE 0x0003 | ||
32 | #define PDR_SYNTH_FRONTEND_XBOW 0x0004 | ||
33 | #define PDR_SYNTH_FRONTEND_LONGBOW 0x0005 | ||
29 | #define PDR_SYNTH_IQ_CAL_MASK 0x0018 | 34 | #define PDR_SYNTH_IQ_CAL_MASK 0x0018 |
30 | #define PDR_SYNTH_IQ_CAL_PA_DETECTOR 0x0000 | 35 | #define PDR_SYNTH_IQ_CAL_PA_DETECTOR 0x0000 |
31 | #define PDR_SYNTH_IQ_CAL_DISABLED 0x0008 | 36 | #define PDR_SYNTH_IQ_CAL_DISABLED 0x0008 |
@@ -125,9 +130,13 @@ struct eeprom_pda_wrap { | |||
125 | u8 data[0]; | 130 | u8 data[0]; |
126 | } __attribute__ ((packed)); | 131 | } __attribute__ ((packed)); |
127 | 132 | ||
133 | struct p54_iq_autocal_entry { | ||
134 | __le16 iq_param[4]; | ||
135 | } __attribute__ ((packed)); | ||
136 | |||
128 | struct pda_iq_autocal_entry { | 137 | struct pda_iq_autocal_entry { |
129 | __le16 freq; | 138 | __le16 freq; |
130 | __le16 iq_param[4]; | 139 | struct p54_iq_autocal_entry params; |
131 | } __attribute__ ((packed)); | 140 | } __attribute__ ((packed)); |
132 | 141 | ||
133 | struct pda_channel_output_limit { | 142 | struct pda_channel_output_limit { |
@@ -186,6 +195,21 @@ struct pda_country { | |||
186 | u8 flags; | 195 | u8 flags; |
187 | } __attribute__ ((packed)); | 196 | } __attribute__ ((packed)); |
188 | 197 | ||
198 | /* | ||
199 | * Warning: Longbow's structures are bogus. | ||
200 | */ | ||
201 | struct p54_channel_output_limit_longbow { | ||
202 | __le16 rf_power_points[12]; | ||
203 | } __attribute__ ((packed)); | ||
204 | |||
205 | struct p54_pa_curve_data_sample_longbow { | ||
206 | __le16 rf_power; | ||
207 | __le16 pa_detector; | ||
208 | struct { | ||
209 | __le16 data[4]; | ||
210 | } points[3] __attribute__ ((packed)); | ||
211 | } __attribute__ ((packed)); | ||
212 | |||
189 | struct pda_custom_wrapper { | 213 | struct pda_custom_wrapper { |
190 | __le16 entries; | 214 | __le16 entries; |
191 | __le16 entry_size; | 215 | __le16 entry_size; |
@@ -381,9 +405,18 @@ struct p54_tx_data { | |||
381 | u8 backlog; | 405 | u8 backlog; |
382 | __le16 durations[4]; | 406 | __le16 durations[4]; |
383 | u8 tx_antenna; | 407 | u8 tx_antenna; |
384 | u8 output_power; | 408 | union { |
385 | u8 cts_rate; | 409 | struct { |
386 | u8 unalloc2[3]; | 410 | u8 cts_rate; |
411 | __le16 output_power; | ||
412 | } __attribute__((packed)) longbow; | ||
413 | struct { | ||
414 | u8 output_power; | ||
415 | u8 cts_rate; | ||
416 | u8 unalloc; | ||
417 | } __attribute__ ((packed)) normal; | ||
418 | } __attribute__ ((packed)); | ||
419 | u8 unalloc2[2]; | ||
387 | u8 align[0]; | 420 | u8 align[0]; |
388 | } __attribute__ ((packed)); | 421 | } __attribute__ ((packed)); |
389 | 422 | ||
@@ -444,11 +477,14 @@ struct p54_setup_mac { | |||
444 | #define P54_SCAN_ACTIVE BIT(2) | 477 | #define P54_SCAN_ACTIVE BIT(2) |
445 | #define P54_SCAN_FILTER BIT(3) | 478 | #define P54_SCAN_FILTER BIT(3) |
446 | 479 | ||
447 | struct p54_scan { | 480 | struct p54_scan_head { |
448 | __le16 mode; | 481 | __le16 mode; |
449 | __le16 dwell; | 482 | __le16 dwell; |
450 | u8 scan_params[20]; | 483 | u8 scan_params[20]; |
451 | struct pda_iq_autocal_entry iq_autocal; | 484 | __le16 freq; |
485 | } __attribute__ ((packed)); | ||
486 | |||
487 | struct p54_scan_body { | ||
452 | u8 pa_points_per_curve; | 488 | u8 pa_points_per_curve; |
453 | u8 val_barker; | 489 | u8 val_barker; |
454 | u8 val_bpsk; | 490 | u8 val_bpsk; |
@@ -460,19 +496,23 @@ struct p54_scan { | |||
460 | u8 dup_qpsk; | 496 | u8 dup_qpsk; |
461 | u8 dup_16qam; | 497 | u8 dup_16qam; |
462 | u8 dup_64qam; | 498 | u8 dup_64qam; |
463 | union { | 499 | } __attribute__ ((packed)); |
464 | struct pda_rssi_cal_entry v1_rssi; | ||
465 | 500 | ||
466 | struct { | 501 | struct p54_scan_body_longbow { |
467 | __le32 basic_rate_mask; | 502 | struct p54_channel_output_limit_longbow power_limits; |
468 | u8 rts_rates[8]; | 503 | struct p54_pa_curve_data_sample_longbow curve_data[8]; |
469 | struct pda_rssi_cal_entry rssi; | 504 | __le16 unkn[6]; /* maybe more power_limits or rate_mask */ |
470 | } v2 __attribute__ ((packed)); | ||
471 | } __attribute__ ((packed)); | ||
472 | } __attribute__ ((packed)); | 505 | } __attribute__ ((packed)); |
473 | 506 | ||
474 | #define P54_SCAN_V1_LEN 0x70 | 507 | union p54_scan_body_union { |
475 | #define P54_SCAN_V2_LEN 0x7c | 508 | struct p54_scan_body normal; |
509 | struct p54_scan_body_longbow longbow; | ||
510 | } __attribute__ ((packed)); | ||
511 | |||
512 | struct p54_scan_tail_rate { | ||
513 | __le32 basic_rate_mask; | ||
514 | u8 rts_rates[8]; | ||
515 | } __attribute__ ((packed)); | ||
476 | 516 | ||
477 | struct p54_led { | 517 | struct p54_led { |
478 | __le16 mode; | 518 | __le16 mode; |