summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-calib.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 10:34:54 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 21:00:20 +0200
commit4a4a9e81aed702421ef3e782f82d4e929fb81796 (patch)
tree784b3573555d3d7be9f0a744d9da912adcd1774d /drivers/net/wireless/iwlwifi/iwl-calib.c
parentiwlwifi: remove notif_missed_beacons variable (diff)
downloadlinux-4a4a9e81aed702421ef3e782f82d4e929fb81796.tar.xz
linux-4a4a9e81aed702421ef3e782f82d4e929fb81796.zip
iwlwifi: clean up alive_start routine
This patch cleans up alive_start routine. It removes 4965 from the common code and moves the run time calibration reset into a common code. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-calib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-calib.c18
1 files changed, 18 insertions, 0 deletions
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,
}
EXPORT_SYMBOL(iwl_chain_noise_calibration);
+
+void iwl_reset_run_time_calib(struct iwl_priv *priv)
+{
+ int i;
+ memset(&(priv->sensitivity_data), 0,
+ sizeof(struct iwl_sensitivity_data));
+ memset(&(priv->chain_noise_data), 0,
+ sizeof(struct iwl_chain_noise_data));
+ for (i = 0; i < NUM_RX_CHAINS; i++)
+ priv->chain_noise_data.delta_gain_code[i] =
+ CHAIN_NOISE_DELTA_GAIN_INIT_VAL;
+
+ /* Ask for statistics now, the uCode will send notification
+ * periodically after association */
+ iwl_send_statistics_request(priv, CMD_ASYNC);
+}
+EXPORT_SYMBOL(iwl_reset_run_time_calib);
+