aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h68
1 files changed, 36 insertions, 32 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 581b98556c86..d728dd837e97 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -566,6 +566,29 @@ struct iwl4965_ibss_seq {
566 struct list_head list; 566 struct list_head list;
567}; 567};
568 568
569struct iwl_sensitivity_ranges {
570 u16 min_nrg_cck;
571 u16 max_nrg_cck;
572
573 u16 nrg_th_cck;
574 u16 nrg_th_ofdm;
575
576 u16 auto_corr_min_ofdm;
577 u16 auto_corr_min_ofdm_mrc;
578 u16 auto_corr_min_ofdm_x1;
579 u16 auto_corr_min_ofdm_mrc_x1;
580
581 u16 auto_corr_max_ofdm;
582 u16 auto_corr_max_ofdm_mrc;
583 u16 auto_corr_max_ofdm_x1;
584 u16 auto_corr_max_ofdm_mrc_x1;
585
586 u16 auto_corr_max_cck;
587 u16 auto_corr_max_cck_mrc;
588 u16 auto_corr_min_cck;
589 u16 auto_corr_min_cck_mrc;
590};
591
569/** 592/**
570 * struct iwl_hw_params 593 * struct iwl_hw_params
571 * @max_txq_num: Max # Tx queues supported 594 * @max_txq_num: Max # Tx queues supported
@@ -576,6 +599,7 @@ struct iwl4965_ibss_seq {
576 * @max_rxq_log: Log-base-2 of max_rxq_size 599 * @max_rxq_log: Log-base-2 of max_rxq_size
577 * @max_stations: 600 * @max_stations:
578 * @bcast_sta_id: 601 * @bcast_sta_id:
602 * @struct iwl_sensitivity_ranges: range of sensitivity values
579 */ 603 */
580struct iwl_hw_params { 604struct iwl_hw_params {
581 u16 max_txq_num; 605 u16 max_txq_num;
@@ -590,6 +614,9 @@ struct iwl_hw_params {
590 u32 max_pkt_size; 614 u32 max_pkt_size;
591 u8 max_stations; 615 u8 max_stations;
592 u8 bcast_sta_id; 616 u8 bcast_sta_id;
617#ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB
618 const struct iwl_sensitivity_ranges *sens;
619#endif
593}; 620};
594 621
595#define HT_SHORT_GI_20MHZ_ONLY (1 << 0) 622#define HT_SHORT_GI_20MHZ_ONLY (1 << 0)
@@ -732,9 +759,6 @@ extern void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr,
732extern void iwl4965_set_rxon_chain(struct iwl_priv *priv); 759extern void iwl4965_set_rxon_chain(struct iwl_priv *priv);
733extern int iwl4965_alive_notify(struct iwl_priv *priv); 760extern int iwl4965_alive_notify(struct iwl_priv *priv);
734extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode); 761extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
735extern void iwl4965_chain_noise_reset(struct iwl_priv *priv);
736extern void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags,
737 u8 force);
738extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv); 762extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
739extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, 763extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv,
740 u32 rate_n_flags, 764 u32 rate_n_flags,
@@ -818,23 +842,8 @@ struct iwl4965_lq_mngr {
818#define MAX_FA_CCK 50 842#define MAX_FA_CCK 50
819#define MIN_FA_CCK 5 843#define MIN_FA_CCK 5
820 844
821#define NRG_MIN_CCK 97
822#define NRG_MAX_CCK 0
823
824#define AUTO_CORR_MIN_OFDM 85
825#define AUTO_CORR_MIN_OFDM_MRC 170
826#define AUTO_CORR_MIN_OFDM_X1 105
827#define AUTO_CORR_MIN_OFDM_MRC_X1 220
828#define AUTO_CORR_MAX_OFDM 120
829#define AUTO_CORR_MAX_OFDM_MRC 210
830#define AUTO_CORR_MAX_OFDM_X1 140
831#define AUTO_CORR_MAX_OFDM_MRC_X1 270
832#define AUTO_CORR_STEP_OFDM 1 845#define AUTO_CORR_STEP_OFDM 1
833 846
834#define AUTO_CORR_MIN_CCK (125)
835#define AUTO_CORR_MAX_CCK (200)
836#define AUTO_CORR_MIN_CCK_MRC 200
837#define AUTO_CORR_MAX_CCK_MRC 400
838#define AUTO_CORR_STEP_CCK 3 847#define AUTO_CORR_STEP_CCK 3
839#define AUTO_CORR_MAX_TH_CCK 160 848#define AUTO_CORR_MAX_TH_CCK 160
840 849
@@ -865,11 +874,6 @@ enum iwl4965_chain_noise_state {
865 IWL_CHAIN_NOISE_CALIBRATED = 2, 874 IWL_CHAIN_NOISE_CALIBRATED = 2,
866}; 875};
867 876
868enum iwl4965_sensitivity_state {
869 IWL_SENS_CALIB_ALLOWED = 0,
870 IWL_SENS_CALIB_NEED_REINIT = 1,
871};
872
873enum iwl4965_calib_enabled_state { 877enum iwl4965_calib_enabled_state {
874 IWL_CALIB_DISABLED = 0, /* must be 0 */ 878 IWL_CALIB_DISABLED = 0, /* must be 0 */
875 IWL_CALIB_ENABLED = 1, 879 IWL_CALIB_ENABLED = 1,
@@ -884,8 +888,9 @@ struct statistics_general_data {
884 u32 beacon_energy_c; 888 u32 beacon_energy_c;
885}; 889};
886 890
891#ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB
887/* Sensitivity calib data */ 892/* Sensitivity calib data */
888struct iwl4965_sensitivity_data { 893struct iwl_sensitivity_data {
889 u32 auto_corr_ofdm; 894 u32 auto_corr_ofdm;
890 u32 auto_corr_ofdm_mrc; 895 u32 auto_corr_ofdm_mrc;
891 u32 auto_corr_ofdm_x1; 896 u32 auto_corr_ofdm_x1;
@@ -909,12 +914,10 @@ struct iwl4965_sensitivity_data {
909 s32 nrg_auto_corr_silence_diff; 914 s32 nrg_auto_corr_silence_diff;
910 u32 num_in_cck_no_fa; 915 u32 num_in_cck_no_fa;
911 u32 nrg_th_ofdm; 916 u32 nrg_th_ofdm;
912
913 u8 state;
914}; 917};
915 918
916/* Chain noise (differential Rx gain) calib data */ 919/* Chain noise (differential Rx gain) calib data */
917struct iwl4965_chain_noise_data { 920struct iwl_chain_noise_data {
918 u8 state; 921 u8 state;
919 u16 beacon_count; 922 u16 beacon_count;
920 u32 chain_noise_a; 923 u32 chain_noise_a;
@@ -927,6 +930,7 @@ struct iwl4965_chain_noise_data {
927 u8 delta_gain_code[NUM_RX_CHAINS]; 930 u8 delta_gain_code[NUM_RX_CHAINS];
928 u8 radio_write; 931 u8 radio_write;
929}; 932};
933#endif /* CONFIG_IWLWIFI_RUN_TIME_CALIB */
930 934
931#define EEPROM_SEM_TIMEOUT 10 /* milliseconds */ 935#define EEPROM_SEM_TIMEOUT 10 /* milliseconds */
932#define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */ 936#define EEPROM_SEM_RETRY_LIMIT 1000 /* number of attempts (not time) */
@@ -1051,12 +1055,12 @@ struct iwl_priv {
1051 u8 assoc_station_added; 1055 u8 assoc_station_added;
1052 u8 use_ant_b_for_management_frame; /* Tx antenna selection */ 1056 u8 use_ant_b_for_management_frame; /* Tx antenna selection */
1053 u8 valid_antenna; /* Bit mask of antennas actually connected */ 1057 u8 valid_antenna; /* Bit mask of antennas actually connected */
1054#ifdef CONFIG_IWL4965_SENSITIVITY
1055 struct iwl4965_sensitivity_data sensitivity_data;
1056 struct iwl4965_chain_noise_data chain_noise_data;
1057 u8 start_calib; 1058 u8 start_calib;
1059#ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB
1060 struct iwl_sensitivity_data sensitivity_data;
1061 struct iwl_chain_noise_data chain_noise_data;
1058 __le16 sensitivity_tbl[HD_TABLE_SIZE]; 1062 __le16 sensitivity_tbl[HD_TABLE_SIZE];
1059#endif /*CONFIG_IWL4965_SENSITIVITY*/ 1063#endif /*CONFIG_IWLWIFI_RUN_TIME_CALIB*/
1060 1064
1061#ifdef CONFIG_IWL4965_HT 1065#ifdef CONFIG_IWL4965_HT
1062 struct iwl_ht_info current_ht_config; 1066 struct iwl_ht_info current_ht_config;
@@ -1206,7 +1210,7 @@ struct iwl_priv {
1206#endif /* CONFIG_IWLWIFI_DEBUG */ 1210#endif /* CONFIG_IWLWIFI_DEBUG */
1207 1211
1208 struct work_struct txpower_work; 1212 struct work_struct txpower_work;
1209#ifdef CONFIG_IWL4965_SENSITIVITY 1213#ifdef CONFIG_IWL4965_RUN_TIME_CALIB
1210 struct work_struct sensitivity_work; 1214 struct work_struct sensitivity_work;
1211#endif 1215#endif
1212 struct timer_list statistics_periodic; 1216 struct timer_list statistics_periodic;