Skip to content

Commit

Permalink
iwlwifi: fix unload warning and error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Apr 16, 2008
1 parent dfe7d45 commit 5900383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
if (!priv->rfkill_mngr.rfkill)
return 0;

if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return 0;

IWL_DEBUG_RF_KILL("we recieved soft RFKILL set to state %d\n", state);
mutex_lock(&priv->mutex);

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,8 @@ void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
CSR_UCODE_SW_BIT_RFKILL);
spin_unlock_irqrestore(&priv->lock, flags);
/* call the host command only if no hw rf-kill set */
if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
if (!test_bit(STATUS_RF_KILL_HW, &priv->status) &&
iwl_is_ready(priv))
iwl4965_send_card_state(priv,
CARD_STATE_CMD_DISABLE,
0);
Expand Down

0 comments on commit 5900383

Please sign in to comment.