diff mbox series

wifi: iwlwifi: mld: Restart firmware on iwl_mld_no_wowlan_resume() error

Message ID d3ba1006a1b72ceb58c593fa62b9bd7c73e2e4ed.1744366815.git.lukas@wunner.de (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series wifi: iwlwifi: mld: Restart firmware on iwl_mld_no_wowlan_resume() error | expand

Checks

Context Check Description
wifibot/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Lukas Wunner April 11, 2025, 10:21 a.m. UTC
Commit 44605365f935 ("iwlwifi: mld: fix building with CONFIG_PM_SLEEP
disabled") sought to fix build breakage, but inadvertently introduced
a new issue:

iwl_mld_mac80211_start() no longer calls iwl_mld_start_fw() after having
called iwl_mld_stop_fw() in the error path of iwl_mld_no_wowlan_resume().

Fix it.

Fixes: 44605365f935 ("iwlwifi: mld: fix building with CONFIG_PM_SLEEP disabled")
Reported-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Closes: https://lore.kernel.org/r/MW5PR11MB58106D6BC6403845C330C7AAA3A22@MW5PR11MB5810.namprd11.prod.outlook.com/
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mld/mac80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Arnd Bergmann April 11, 2025, 10:36 a.m. UTC | #1
On Fri, Apr 11, 2025, at 12:21, Lukas Wunner wrote:
> Commit 44605365f935 ("iwlwifi: mld: fix building with CONFIG_PM_SLEEP
> disabled") sought to fix build breakage, but inadvertently introduced
> a new issue:
>
> iwl_mld_mac80211_start() no longer calls iwl_mld_start_fw() after having
> called iwl_mld_stop_fw() in the error path of iwl_mld_no_wowlan_resume().
>
> Fix it.
>
> Fixes: 44605365f935 ("iwlwifi: mld: fix building with CONFIG_PM_SLEEP 
> disabled")
> Reported-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> Closes: 
> https://lore.kernel.org/r/MW5PR11MB58106D6BC6403845C330C7AAA3A22@MW5PR11MB5810.namprd11.prod.outlook.com/
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>

Sorry I messed this up.

    Arnd
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
index 0b5bc5abb82d..99e13cfd1e5f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
@@ -475,8 +475,8 @@  static
 int iwl_mld_mac80211_start(struct ieee80211_hw *hw)
 {
 	struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
-	int ret;
 	bool in_d3 = false;
+	int ret = 0;
 
 	lockdep_assert_wiphy(mld->wiphy);
 
@@ -501,7 +501,7 @@  int iwl_mld_mac80211_start(struct ieee80211_hw *hw)
 		iwl_mld_restart_cleanup(mld);
 	}
 
-	if (!in_d3) {
+	if (!in_d3 || ret) {
 		ret = iwl_mld_start_fw(mld);
 		if (ret)
 			goto error;