summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2026-05-27 23:05:09 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2026-06-03 17:02:55 +0300
commit301b0dfa9db3f1e204de95e803bbd88fbd878c7c (patch)
treed9a32516c3271b74af19c4fb605c77ec1fc56445 /drivers
parent7ebdca63eca82394f546a2274c460956b356cea3 (diff)
wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o netdetect
Clearly, from a user perspective, it must be valid to configure WoWLAN and then suspend while not connected to a network. Since mac80211 doesn't distinguish these cases and simply calls the driver to suspend whenever WoWLAN is configured, the driver has to cleanly handle the case where it's called for WoWLAN, it's not connected but there's also no netdetect configured. Remove the WARN_ON() and keep returning 1 to disconnect and then suspend. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20260527230313.19720967372b.Iff30814510a26f9f609f98eeea3111c50c1afb31@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/d3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
index fc0a5871df2f..458a668ba916 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
@@ -2066,8 +2066,11 @@ int iwl_mld_wowlan_suspend(struct iwl_mld *mld, struct cfg80211_wowlan *wowlan)
if (!bss_vif->cfg.assoc) {
int ret;
- /* If we're not associated, this must be netdetect */
- if (WARN_ON(!wowlan->nd_config))
+ /*
+ * If not associated we can only do netdetect, if
+ * that's not enabled then just suspend normally.
+ */
+ if (!wowlan->nd_config)
return 1;
ret = iwl_mld_netdetect_config(mld, bss_vif, wowlan);