From: Luciano Coelho Date: Wed, 20 Aug 2014 08:49:11 +0000 (+0300) Subject: iwlwifi: mvm: reset ucode_loaded flag when mac80211 stop is called X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc44886d2645bb4c0422db09f67661638eacc3d1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git iwlwifi: mvm: reset ucode_loaded flag when mac80211 stop is called We rely on the value of the mvm->ucode_loaded flag to decide whether or not we can perform certain operations (e.g. access to some debugfs entries), so we need to reset it when the mac80211 stop operation is called and the hardware is shutdown. Signed-off-by: Luciano Coelho 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 069bb8e81c36..bcfb03ce46be 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -890,6 +890,8 @@ static void iwl_mvm_mac_stop(struct ieee80211_hw *hw) /* the fw is stopped, the aux sta is dead: clean up driver state */ iwl_mvm_del_aux_sta(mvm); + mvm->ucode_loaded = false; + mutex_unlock(&mvm->mutex); /*