From: Arik Nemtsov Date: Wed, 4 Mar 2015 11:16:03 +0000 (+0200) Subject: iwlwifi: mvm: clean interfaces on drv_stop X-Git-Tag: v4.2-rc1~130^2~139^2^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b2b9fbf7e4e1b2e866239d46248431f719ba2c1;p=platform%2Fkernel%2Flinux-exynos.git iwlwifi: mvm: clean interfaces on drv_stop If a HW recovery was started but not completed since all interfaces went down, make sure to cleanup all interfaces before clearing the HW_RESTART flag. Signed-off-by: Arik Nemtsov Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 71b66cb..9e517e2 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -1489,8 +1489,12 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm) /* * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete() * won't be called in this case). + * But make sure to cleanup interfaces that have gone down before/during + * HW restart was requested. */ - clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status); + if (test_and_clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) + ieee80211_iterate_interfaces(mvm->hw, 0, + iwl_mvm_cleanup_iterator, mvm); /* We shouldn't have any UIDs still set. Loop over all the UIDs to * make sure there's nothing left there and warn if any is found.