aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2013-06-16 12:18:11 +0300
committerJohannes Berg <johannes.berg@intel.com>2013-07-31 11:05:00 +0200
commitfd11bd05552e8639abbdc2f1d478f70dfb9b5e3e (patch)
tree607b4d2586b490c10e2cd63aca20eb941c6d32e3 /drivers/net/wireless
parentiwlwifi: mvm: Change AM->PSM timeout for EAPOL frames (diff)
downloadlinux-dev-fd11bd05552e8639abbdc2f1d478f70dfb9b5e3e.tar.xz
linux-dev-fd11bd05552e8639abbdc2f1d478f70dfb9b5e3e.zip
iwlwifi: mvm: Return on inconsistency in add interface
Return in case that HW restart is in progress but the added interface is not found during the iteration over all the interfaces. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 94aae9c8562c..5fe23a5ea9b6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -264,7 +264,8 @@ static int iwl_mvm_mac_ctxt_allocate_resources(struct iwl_mvm *mvm,
return 0;
/* Therefore, in recovery, we can't get here */
- WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status));
+ if (WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
+ return -EBUSY;
mvmvif->id = find_first_bit(data.available_mac_ids,
NUM_MAC_INDEX_DRIVER);