aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2008-04-15 19:01:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 16:00:01 -0400
commit59003835020ed696e941df2f8a50210bdc6e246c (patch)
tree03a2dba3b93661b48f14ce391440e1d8185aba76 /drivers/net/wireless
parentdfe7d458408188718089f41d0e2330fed13697e2 (diff)
iwlwifi: fix unload warning and error
This patch fix the error we get when unload the driver, No space for Tx. The cause of this problem is related to receiving late SW rfkill from rfkill subsystem during the driver teardown causing this error. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rfkill.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c
index 8f38c24491cd..5980a5621cb8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c
@@ -47,6 +47,9 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
47 if (!priv->rfkill_mngr.rfkill) 47 if (!priv->rfkill_mngr.rfkill)
48 return 0; 48 return 0;
49 49
50 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
51 return 0;
52
50 IWL_DEBUG_RF_KILL("we recieved soft RFKILL set to state %d\n", state); 53 IWL_DEBUG_RF_KILL("we recieved soft RFKILL set to state %d\n", state);
51 mutex_lock(&priv->mutex); 54 mutex_lock(&priv->mutex);
52 55
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 0eb4220f035f..dae881e47293 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2427,7 +2427,8 @@ void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2427 CSR_UCODE_SW_BIT_RFKILL); 2427 CSR_UCODE_SW_BIT_RFKILL);
2428 spin_unlock_irqrestore(&priv->lock, flags); 2428 spin_unlock_irqrestore(&priv->lock, flags);
2429 /* call the host command only if no hw rf-kill set */ 2429 /* call the host command only if no hw rf-kill set */
2430 if (!test_bit(STATUS_RF_KILL_HW, &priv->status)) 2430 if (!test_bit(STATUS_RF_KILL_HW, &priv->status) &&
2431 iwl_is_ready(priv))
2431 iwl4965_send_card_state(priv, 2432 iwl4965_send_card_state(priv,
2432 CARD_STATE_CMD_DISABLE, 2433 CARD_STATE_CMD_DISABLE,
2433 0); 2434 0);