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>
This commit is contained in:
Ilan Peer 2013-06-16 12:18:11 +03:00 committed by Johannes Berg
parent 0f2ed58e6e
commit fd11bd0555

View file

@ -264,7 +264,8 @@ static int iwl_mvm_mac_ctxt_allocate_resources(struct iwl_mvm *mvm,
return 0; return 0;
/* Therefore, in recovery, we can't get here */ /* 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, mvmvif->id = find_first_bit(data.available_mac_ids,
NUM_MAC_INDEX_DRIVER); NUM_MAC_INDEX_DRIVER);