diff options
author | Dor Shaish <dor.shaish@intel.com> | 2012-03-26 17:20:55 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-04-16 23:36:44 +0200 |
commit | bfb45f5422deb3bbf12d8f67f5f76e4b9a7eb766 (patch) | |
tree | e932a99a3ecacf609572288e0ddc5930187151b8 /drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |
parent | iwlwifi: remove uneeded include from iwl-pci.c (diff) | |
download | linux-bfb45f5422deb3bbf12d8f67f5f76e4b9a7eb766.tar.xz linux-bfb45f5422deb3bbf12d8f67f5f76e4b9a7eb766.zip |
iwlwifi: Disabling calibrations variable
Add a variable for disabling specific calibrations.
Merged old variables for calibrations disabling.
Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 69279af5a41d..88a7f3a1056c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -414,6 +414,9 @@ static int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) bool defer; struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; + if (priv->calib_disabled & IWL_TX_POWER_CALIB_DISABLED) + return 0; + lockdep_assert_held(&priv->mutex); if (priv->tx_power_user_lmt == tx_power && !force) @@ -1319,6 +1322,9 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) struct iwl_chain_noise_data *data = &priv->chain_noise_data; int ret; + if (!(priv->calib_disabled & IWL_CHAIN_NOISE_CALIB_DISABLED)) + return; + if ((data->state == IWL_CHAIN_NOISE_ALIVE) && iwl_is_any_associated(priv)) { struct iwl_calib_chain_noise_reset_cmd cmd; @@ -1471,8 +1477,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, iwl_power_update_mode(priv, false); /* Enable RX differential gain and sensitivity calibrations */ - if (!priv->disable_chain_noise_cal) - iwlagn_chain_noise_reset(priv); + iwlagn_chain_noise_reset(priv); priv->start_calib = 1; } |