diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2009-11-23 22:33:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-28 15:04:41 -0500 |
commit | fe19176ea46db572f0dc2df8bfe1dc5d8751ab9e (patch) | |
tree | 24cd2a6468ed174a09b69373058839e9b513191a /drivers/net/wireless/iwmc3200wifi | |
parent | 902b6667d3d17ac53ec62c036cd2bcf713c29d86 (diff) |
iwmc3200wifi: Dont set the UMAC power limit when interface is down
When we're down, we shouldnt try to set the UMAC power limit. We just return 0
instead, and cfg80211 toggles the soft rfkill state.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/cfg80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c index 2e00a4b389e6..7cfc2c0a1fbc 100644 --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c | |||
@@ -678,6 +678,9 @@ static int iwm_cfg80211_set_txpower(struct wiphy *wiphy, | |||
678 | case TX_POWER_AUTOMATIC: | 678 | case TX_POWER_AUTOMATIC: |
679 | return 0; | 679 | return 0; |
680 | case TX_POWER_FIXED: | 680 | case TX_POWER_FIXED: |
681 | if (!test_bit(IWM_STATUS_READY, &iwm->status)) | ||
682 | return 0; | ||
683 | |||
681 | ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX, | 684 | ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX, |
682 | CFG_TX_PWR_LIMIT_USR, dbm * 2); | 685 | CFG_TX_PWR_LIMIT_USR, dbm * 2); |
683 | if (ret < 0) | 686 | if (ret < 0) |
@@ -685,6 +688,7 @@ static int iwm_cfg80211_set_txpower(struct wiphy *wiphy, | |||
685 | 688 | ||
686 | return iwm_tx_power_trigger(iwm); | 689 | return iwm_tx_power_trigger(iwm); |
687 | default: | 690 | default: |
691 | IWM_ERR(iwm, "Unsupported power type: %d\n", type); | ||
688 | return -EOPNOTSUPP; | 692 | return -EOPNOTSUPP; |
689 | } | 693 | } |
690 | 694 | ||