summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-04-30 16:34:45 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-06-24 21:55:41 +0300
commitc47af22ad630e03053f3eeefd19bd8274989ffbb (patch)
treed3274eda63763ddb7281100a2423927de1819866 /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parent75f6b9b64eeead2a7726f342b89a0c74c985e584 (diff)
downloadop-kernel-dev-c47af22ad630e03053f3eeefd19bd8274989ffbb.zip
op-kernel-dev-c47af22ad630e03053f3eeefd19bd8274989ffbb.tar.gz
iwlwifi: mvm: handle device start failures during restart
If the device fails during a restart, mac80211 now handles the situation better but we still have a little bit of cleanup to do in the driver - add the required code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: ArikX Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index f2fde36..3c2c9b9 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -689,6 +689,16 @@ static int iwl_mvm_mac_start(struct ieee80211_hw *hw)
iwl_mvm_restart_cleanup(mvm);
ret = iwl_mvm_up(mvm);
+
+ if (ret && test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
+ /* Something went wrong - we need to finish some cleanup
+ * that normally iwl_mvm_mac_restart_complete() below
+ * would do.
+ */
+ clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
+ iwl_mvm_d0i3_enable_tx(mvm, NULL);
+ }
+
mutex_unlock(&mvm->mutex);
return ret;
OpenPOWER on IntegriCloud