Skip to content

Commit

Permalink
iwlwifi: mvm: don't iterate interfaces to disconnect in net-detect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luciano Coelho authored and Emmanuel Grumbach committed Mar 2, 2015
1 parent 7e1223b commit e0ede17
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/wireless/iwlwifi/mvm/d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e0ede17

Please sign in to comment.