diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-calib.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-calib.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 19 |
5 files changed, 32 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 063ba2ec1ebd..d548bda1ff72 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -921,15 +921,6 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
921 | 921 | ||
922 | spin_lock_irqsave(&priv->lock, flags); | 922 | spin_lock_irqsave(&priv->lock, flags); |
923 | 923 | ||
924 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
925 | memset(&(priv->sensitivity_data), 0, | ||
926 | sizeof(struct iwl_sensitivity_data)); | ||
927 | memset(&(priv->chain_noise_data), 0, | ||
928 | sizeof(struct iwl_chain_noise_data)); | ||
929 | for (i = 0; i < NUM_RX_CHAINS; i++) | ||
930 | priv->chain_noise_data.delta_gain_code[i] = | ||
931 | CHAIN_NOISE_DELTA_GAIN_INIT_VAL; | ||
932 | #endif /* CONFIG_IWL4965_RUN_TIME_CALIB*/ | ||
933 | ret = iwl_grab_nic_access(priv); | 924 | ret = iwl_grab_nic_access(priv); |
934 | if (ret) { | 925 | if (ret) { |
935 | spin_unlock_irqrestore(&priv->lock, flags); | 926 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -996,9 +987,6 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
996 | iwl_release_nic_access(priv); | 987 | iwl_release_nic_access(priv); |
997 | spin_unlock_irqrestore(&priv->lock, flags); | 988 | spin_unlock_irqrestore(&priv->lock, flags); |
998 | 989 | ||
999 | /* Ask for statistics now, the uCode will send statistics notification | ||
1000 | * periodically after association */ | ||
1001 | iwl_send_statistics_request(priv, CMD_ASYNC); | ||
1002 | return ret; | 990 | return ret; |
1003 | } | 991 | } |
1004 | 992 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index d6ffdeefcf0d..0355ccd2d296 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -580,10 +580,6 @@ static int iwl5000_alive_notify(struct iwl_priv *priv) | |||
580 | 580 | ||
581 | iwl5000_send_wimax_coex(priv); | 581 | iwl5000_send_wimax_coex(priv); |
582 | 582 | ||
583 | /* Ask for statistics now, the uCode will send notification | ||
584 | * periodically after association */ | ||
585 | iwl_send_statistics_request(priv, CMD_ASYNC); | ||
586 | |||
587 | return 0; | 583 | return 0; |
588 | } | 584 | } |
589 | 585 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c index beb9716165c3..a6c7f0d9a414 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-calib.c | |||
@@ -786,3 +786,21 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, | |||
786 | } | 786 | } |
787 | EXPORT_SYMBOL(iwl_chain_noise_calibration); | 787 | EXPORT_SYMBOL(iwl_chain_noise_calibration); |
788 | 788 | ||
789 | |||
790 | void iwl_reset_run_time_calib(struct iwl_priv *priv) | ||
791 | { | ||
792 | int i; | ||
793 | memset(&(priv->sensitivity_data), 0, | ||
794 | sizeof(struct iwl_sensitivity_data)); | ||
795 | memset(&(priv->chain_noise_data), 0, | ||
796 | sizeof(struct iwl_chain_noise_data)); | ||
797 | for (i = 0; i < NUM_RX_CHAINS; i++) | ||
798 | priv->chain_noise_data.delta_gain_code[i] = | ||
799 | CHAIN_NOISE_DELTA_GAIN_INIT_VAL; | ||
800 | |||
801 | /* Ask for statistics now, the uCode will send notification | ||
802 | * periodically after association */ | ||
803 | iwl_send_statistics_request(priv, CMD_ASYNC); | ||
804 | } | ||
805 | EXPORT_SYMBOL(iwl_reset_run_time_calib); | ||
806 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.h b/drivers/net/wireless/iwlwifi/iwl-calib.h index e690668f08a1..b8e57c59eac8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.h +++ b/drivers/net/wireless/iwlwifi/iwl-calib.h | |||
@@ -78,7 +78,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv, | |||
78 | struct iwl4965_notif_statistics *resp); | 78 | struct iwl4965_notif_statistics *resp); |
79 | 79 | ||
80 | void iwl_init_sensitivity(struct iwl_priv *priv); | 80 | void iwl_init_sensitivity(struct iwl_priv *priv); |
81 | 81 | void iwl_reset_run_time_calib(struct iwl_priv *priv); | |
82 | static inline void iwl_chain_noise_reset(struct iwl_priv *priv) | 82 | static inline void iwl_chain_noise_reset(struct iwl_priv *priv) |
83 | { | 83 | { |
84 | 84 | ||
@@ -101,6 +101,9 @@ static inline void iwl_init_sensitivity(struct iwl_priv *priv) | |||
101 | static inline void iwl_chain_noise_reset(struct iwl_priv *priv) | 101 | static inline void iwl_chain_noise_reset(struct iwl_priv *priv) |
102 | { | 102 | { |
103 | } | 103 | } |
104 | static inline void iwl_reset_run_time_calib(struct iwl_priv *priv) | ||
105 | { | ||
106 | } | ||
104 | #endif | 107 | #endif |
105 | 108 | ||
106 | #endif /* __iwl_calib_h__ */ | 109 | #endif /* __iwl_calib_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 6785200cf236..5a5306de2956 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -3244,11 +3244,11 @@ static int iwl4965_read_ucode(struct iwl_priv *priv) | |||
3244 | } | 3244 | } |
3245 | 3245 | ||
3246 | /** | 3246 | /** |
3247 | * iwl4965_alive_start - called after REPLY_ALIVE notification received | 3247 | * iwl_alive_start - called after REPLY_ALIVE notification received |
3248 | * from protocol/runtime uCode (initialization uCode's | 3248 | * from protocol/runtime uCode (initialization uCode's |
3249 | * Alive gets handled by iwl4965_init_alive_start()). | 3249 | * Alive gets handled by iwl_init_alive_start()). |
3250 | */ | 3250 | */ |
3251 | static void iwl4965_alive_start(struct iwl_priv *priv) | 3251 | static void iwl_alive_start(struct iwl_priv *priv) |
3252 | { | 3252 | { |
3253 | int ret = 0; | 3253 | int ret = 0; |
3254 | 3254 | ||
@@ -3272,7 +3272,6 @@ static void iwl4965_alive_start(struct iwl_priv *priv) | |||
3272 | } | 3272 | } |
3273 | 3273 | ||
3274 | iwlcore_clear_stations_table(priv); | 3274 | iwlcore_clear_stations_table(priv); |
3275 | |||
3276 | ret = priv->cfg->ops->lib->alive_notify(priv); | 3275 | ret = priv->cfg->ops->lib->alive_notify(priv); |
3277 | if (ret) { | 3276 | if (ret) { |
3278 | IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", | 3277 | IWL_WARNING("Could not complete ALIVE transition [ntf]: %d\n", |
@@ -3310,6 +3309,8 @@ static void iwl4965_alive_start(struct iwl_priv *priv) | |||
3310 | /* Configure Bluetooth device coexistence support */ | 3309 | /* Configure Bluetooth device coexistence support */ |
3311 | iwl4965_send_bt_config(priv); | 3310 | iwl4965_send_bt_config(priv); |
3312 | 3311 | ||
3312 | iwl_reset_run_time_calib(priv); | ||
3313 | |||
3313 | /* Configure the adapter for unassociated operation */ | 3314 | /* Configure the adapter for unassociated operation */ |
3314 | iwl4965_commit_rxon(priv); | 3315 | iwl4965_commit_rxon(priv); |
3315 | 3316 | ||
@@ -3554,7 +3555,7 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
3554 | * | 3555 | * |
3555 | *****************************************************************************/ | 3556 | *****************************************************************************/ |
3556 | 3557 | ||
3557 | static void iwl4965_bg_init_alive_start(struct work_struct *data) | 3558 | static void iwl_bg_init_alive_start(struct work_struct *data) |
3558 | { | 3559 | { |
3559 | struct iwl_priv *priv = | 3560 | struct iwl_priv *priv = |
3560 | container_of(data, struct iwl_priv, init_alive_start.work); | 3561 | container_of(data, struct iwl_priv, init_alive_start.work); |
@@ -3567,7 +3568,7 @@ static void iwl4965_bg_init_alive_start(struct work_struct *data) | |||
3567 | mutex_unlock(&priv->mutex); | 3568 | mutex_unlock(&priv->mutex); |
3568 | } | 3569 | } |
3569 | 3570 | ||
3570 | static void iwl4965_bg_alive_start(struct work_struct *data) | 3571 | static void iwl_bg_alive_start(struct work_struct *data) |
3571 | { | 3572 | { |
3572 | struct iwl_priv *priv = | 3573 | struct iwl_priv *priv = |
3573 | container_of(data, struct iwl_priv, alive_start.work); | 3574 | container_of(data, struct iwl_priv, alive_start.work); |
@@ -3576,7 +3577,7 @@ static void iwl4965_bg_alive_start(struct work_struct *data) | |||
3576 | return; | 3577 | return; |
3577 | 3578 | ||
3578 | mutex_lock(&priv->mutex); | 3579 | mutex_lock(&priv->mutex); |
3579 | iwl4965_alive_start(priv); | 3580 | iwl_alive_start(priv); |
3580 | mutex_unlock(&priv->mutex); | 3581 | mutex_unlock(&priv->mutex); |
3581 | } | 3582 | } |
3582 | 3583 | ||
@@ -5466,8 +5467,8 @@ static void iwl4965_setup_deferred_work(struct iwl_priv *priv) | |||
5466 | INIT_WORK(&priv->beacon_update, iwl4965_bg_beacon_update); | 5467 | INIT_WORK(&priv->beacon_update, iwl4965_bg_beacon_update); |
5467 | INIT_WORK(&priv->set_monitor, iwl4965_bg_set_monitor); | 5468 | INIT_WORK(&priv->set_monitor, iwl4965_bg_set_monitor); |
5468 | INIT_DELAYED_WORK(&priv->post_associate, iwl4965_bg_post_associate); | 5469 | INIT_DELAYED_WORK(&priv->post_associate, iwl4965_bg_post_associate); |
5469 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl4965_bg_init_alive_start); | 5470 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); |
5470 | INIT_DELAYED_WORK(&priv->alive_start, iwl4965_bg_alive_start); | 5471 | INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); |
5471 | INIT_DELAYED_WORK(&priv->scan_check, iwl4965_bg_scan_check); | 5472 | INIT_DELAYED_WORK(&priv->scan_check, iwl4965_bg_scan_check); |
5472 | 5473 | ||
5473 | iwl4965_hw_setup_deferred_work(priv); | 5474 | iwl4965_hw_setup_deferred_work(priv); |