summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/d3.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2015-02-13 21:37:09 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-02 08:19:32 +0200
commite0ede17789b50537439931f974deeed9cb24026b (patch)
treec0dd907a202df4023cf9469843d40370d52fffdf /drivers/net/wireless/iwlwifi/mvm/d3.c
parent7e1223b50089ab5901215d2fd8c61b42c7cfe034 (diff)
iwlwifi: mvm: don't iterate interfaces to disconnect in net-detect
We shouldn't call iwl_mvm_d3_disconnect_iter() on the running interfaces when we are woken up due to net-detect, because it doesn't make sense. Additionally, this seems to set the IEEE80211_SDATA_DISCONNECT_RESUME flag that will cause a disconnection on the next resume (if a normal WoWLAN is used). To solve this, skip the iteration loop when net-detect is set. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reported-by: Samuel Tan <samueltan@chromium.org> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/d3.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/d3.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 14e8fd661889..9bdfa95d6ce7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -1876,25 +1876,28 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
if (mvm->net_detect) {
iwl_mvm_query_netdetect_reasons(mvm, vif);
+ /* has unlocked the mutex, so skip that */
+ goto out;
} else {
keep = iwl_mvm_query_wakeup_reasons(mvm, vif);
#ifdef CONFIG_IWLWIFI_DEBUGFS
if (keep)
mvm->keep_vif = vif;
+ /* has unlocked the mutex, so skip that */
+ goto out_iterate;
#endif
}
- /* has unlocked the mutex, so skip that */
- goto out;
out_unlock:
mutex_unlock(&mvm->mutex);
- out:
+out_iterate:
if (!test)
ieee80211_iterate_active_interfaces_rtnl(mvm->hw,
IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_d3_disconnect_iter, keep ? vif : NULL);
+out:
/* return 1 to reconfigure the device */
set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
set_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status);