summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-26 18:08:38 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-26 18:08:38 -0500
commitb63a2a1ff1f7cde479aef091a4b9a9f7238a0657 (patch)
treec6f1f9cdc1b3a0ae59424d29044d8a43e6e48762 /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parent5f35227ea34bb616c436d9da47fc325866c428f3 (diff)
parent8975842bed0840f314281c9fbf021a1d29537cf0 (diff)
Merge tag 'wireless-drivers-for-davem-2014-12-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
o Paul made a Kconfig dependency fix to ipw2200, it was not possible to enable that driver because Wireless Extensions is now disabled by default. o Mika fixed brcmfmac not to crash when platform data is not populated o Emmanuel provided few fixes to iwlwifi, he says: "I have here new device IDs and a fix for double free bug I introduced. I also fix an issue with the RFKILL interrupt - the HW needs us to ACK the interrupt again after we reset it. Liad fixes an issue with the firmware debugging infrastructure. While working on torture scenarios of firmware restarts, Eliad found an issue which he fixed." Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 31a5b3f4266c..e880f9d4717b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1004,8 +1004,13 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
{
lockdep_assert_held(&mvm->mutex);
- /* disallow low power states when the FW is down */
- iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
+ /*
+ * Disallow low power states when the FW is down by taking
+ * the UCODE_DOWN ref. in case of ongoing hw restart the
+ * ref is already taken, so don't take it again.
+ */
+ if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
+ iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
/* async_handlers_wk is now blocked */
@@ -1023,6 +1028,12 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
/* the fw is stopped, the aux sta is dead: clean up driver state */
iwl_mvm_del_aux_sta(mvm);
+ /*
+ * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
+ * won't be called in this case).
+ */
+ clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
+
mvm->ucode_loaded = false;
}