aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_cmd.h
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:43 -0500
commit152ee6e09e2ce54d7d1cc9d338b82c0bf3cbbc95 (patch)
treed6f9ffed8d59cc257f2dfd884337f946a212ea3b /drivers/net/wireless/wl12xx/wl1271_cmd.h
parentc6999d831ab9ae5e368b20f3bc11b0ca9c17a7ec (diff)
wl1271: Use NVS INI file configuration
Replace the hardcoded general and radio parameter configuration in the driver with configuration taken from the NVS file directly. Also remove the driver dependency to the structures with the parameter data. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.h86
1 files changed, 10 insertions, 76 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index ba433f423c8b..2dc06c73532b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -428,90 +428,24 @@ struct wl1271_general_parms_cmd {
428 428
429 struct wl1271_cmd_test_header test; 429 struct wl1271_cmd_test_header test;
430 430
431 u8 ref_clk; 431 u8 params[WL1271_NVS_GENERAL_PARAMS_SIZE];
432 u8 settling_time; 432 s8 reserved[23];
433 u8 clk_valid_on_wakeup;
434 u8 dc2dcmode;
435 u8 single_dual_band;
436
437 u8 tx_bip_fem_autodetect;
438 u8 tx_bip_fem_manufacturer;
439 u8 settings;
440
441 u8 sr_state;
442
443 s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS];
444 s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS];
445 s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS];
446
447 s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS];
448
449 u8 sr_sen_n_p;
450 u8 sr_sen_n_p_gain;
451 u8 sr_sen_nrn;
452 u8 sr_sen_prn;
453
454 u8 padding[3];
455} __attribute__ ((packed)); 433} __attribute__ ((packed));
456 434
435#define WL1271_STAT_RADIO_PARAMS_5_SIZE 29
436#define WL1271_DYN_RADIO_PARAMS_5_SIZE 104
437
457struct wl1271_radio_parms_cmd { 438struct wl1271_radio_parms_cmd {
458 struct wl1271_cmd_header header; 439 struct wl1271_cmd_header header;
459 440
460 struct wl1271_cmd_test_header test; 441 struct wl1271_cmd_test_header test;
461 442
462 /* Static radio parameters */ 443 u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE];
463 /* 2.4GHz */ 444 u8 stat_radio_params_5[WL1271_STAT_RADIO_PARAMS_5_SIZE];
464 u8 rx_trace_loss;
465 u8 tx_trace_loss;
466 s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
467
468 /* 5GHz */
469 u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
470 u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
471 s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
472
473 /* Dynamic radio parameters */
474 /* 2.4GHz */
475 __le16 tx_ref_pd_voltage;
476 u8 tx_ref_power;
477 s8 tx_offset_db;
478
479 s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
480 s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
481 s8 tx_rate_limits_extreme[CONF_NUMBER_OF_RATE_GROUPS];
482 445
483 s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4]; 446 u8 dyn_radio_params[WL1271_NVS_DYN_RADIO_PARAMS_SIZE];
484 s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4]; 447 u8 reserved;
485 s8 tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS]; 448 u8 dyn_radio_params_5[WL1271_DYN_RADIO_PARAMS_5_SIZE];
486
487 u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
488 u8 rx_fem_insertion_loss;
489
490 u8 degraded_low_to_normal_threshold;
491 u8 degraded_normal_to_high_threshold;
492
493 u8 padding1; /* our own padding, not in ref driver */
494
495 /* 5GHz */
496 __le16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
497 u8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
498 s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
499
500 s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
501 s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
502 s8 tx_rate_limits_extreme_5[CONF_NUMBER_OF_RATE_GROUPS];
503
504 s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
505 s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
506
507 /* FIXME: this is inconsistent with the types for 2.4GHz */
508 s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
509 s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
510
511 u8 degraded_low_to_normal_threshold_5;
512 u8 degraded_normal_to_high_threshold_5;
513
514 u8 padding2[2];
515} __attribute__ ((packed)); 449} __attribute__ ((packed));
516 450
517struct wl1271_cmd_cal_channel_tune { 451struct wl1271_cmd_cal_channel_tune {