diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-30 05:23:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:43 -0400 |
commit | 3bff19c203d216436a73e56b8298bebd5ea75a3f (patch) | |
tree | a1872c04ac3d4f39068832517757be2cf7bcd7d6 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | ebef2008082f579d8a40cc92e868fe8bf1296a60 (diff) |
iwlwifi: don't bring up interface if RF-kill avoids radio
This patch avoids the user from bringing up the interface if RF-kill
doesn't allow radio.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@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/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index d1bf599e483f..2d0d079a24ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -2187,13 +2187,15 @@ static int __iwl4965_up(struct iwl_priv *priv) | |||
2187 | if (iwl_read32(priv, CSR_GP_CNTRL) & | 2187 | if (iwl_read32(priv, CSR_GP_CNTRL) & |
2188 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) | 2188 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) |
2189 | clear_bit(STATUS_RF_KILL_HW, &priv->status); | 2189 | clear_bit(STATUS_RF_KILL_HW, &priv->status); |
2190 | else { | 2190 | else |
2191 | set_bit(STATUS_RF_KILL_HW, &priv->status); | 2191 | set_bit(STATUS_RF_KILL_HW, &priv->status); |
2192 | if (!test_bit(STATUS_IN_SUSPEND, &priv->status)) { | 2192 | |
2193 | iwl_rfkill_set_hw_state(priv); | 2193 | if (!test_bit(STATUS_IN_SUSPEND, &priv->status) && |
2194 | IWL_WARNING("Radio disabled by HW RF Kill switch\n"); | 2194 | iwl_is_rfkill(priv)) { |
2195 | return -ENODEV; | 2195 | iwl_rfkill_set_hw_state(priv); |
2196 | } | 2196 | IWL_WARNING("Radio disabled by %s RF Kill switch\n", |
2197 | test_bit(STATUS_RF_KILL_HW, &priv->status) ? "HW" : "SW"); | ||
2198 | return -ENODEV; | ||
2197 | } | 2199 | } |
2198 | 2200 | ||
2199 | iwl_rfkill_set_hw_state(priv); | 2201 | iwl_rfkill_set_hw_state(priv); |