Skip to content

Commit b753b33

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif
Clearly, from a user perspective, it must be valid to configure WoWLAN (which can include network detection) and then suspend while not connected to a network, or even without an interface at all (WoWLAN config is handled on a per-wiphy basis). 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 but no (BSS) interface exists. Remove the WARN_ON(), move the print so it doesn't get done in this case, and keep returning 1 to disconnect everything. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20260515151352.0c55d1135409.I54f8be0e2aa28cfb1cb1dcf3b2d2d8fe75b4397b@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
1 parent 25e416f commit b753b33

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mld

drivers/net/wireless/intel/iwlwifi/mld/d3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,12 +1930,12 @@ int iwl_mld_wowlan_suspend(struct iwl_mld *mld, struct cfg80211_wowlan *wowlan)
19301930
if (WARN_ON(!wowlan))
19311931
return 1;
19321932

1933-
IWL_DEBUG_WOWLAN(mld, "Starting the wowlan suspend flow\n");
1934-
19351933
bss_vif = iwl_mld_get_bss_vif(mld);
1936-
if (WARN_ON(!bss_vif))
1934+
if (!bss_vif)
19371935
return 1;
19381936

1937+
IWL_DEBUG_WOWLAN(mld, "Starting the wowlan suspend flow\n");
1938+
19391939
if (!bss_vif->cfg.assoc) {
19401940
int ret;
19411941
/* If we're not associated, this must be netdetect */

0 commit comments

Comments
 (0)