Skip to content

Commit c815f2f

Browse files
committed
iwlwifi: mld: fix building with CONFIG_PM_SLEEP disabled
JIRA: https://issues.redhat.com/browse/RHEL-89168 commit 4460536 Author: Arnd Bergmann <[email protected]> Date: Tue Mar 25 09:43:30 2025 +0100 iwlwifi: mld: fix building with CONFIG_PM_SLEEP disabled The newly added driver causes multiple build problems when CONFIG_PM_SLEEP is disabled: drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1982:12: error: 'iwl_mld_resume' defined but not used [-Werror=unused-function] 1982 | static int iwl_mld_resume(struct ieee80211_hw *hw) | ^~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1960:1: error: 'iwl_mld_suspend' defined but not used [-Werror=unused-function] 1960 | iwl_mld_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | ^~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:1946:13: error: 'iwl_mld_set_wakeup' defined but not used [-Werror=unused-function] 1946 | static void iwl_mld_set_wakeup(struct ieee80211_hw *hw, bool enabled) | ^~~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/mld/mac80211.c: In function 'iwl_mld_mac80211_start': drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:504:20: error: 'ret' is used uninitialized [-Werror=uninitialized] 504 | if (!in_d3 || ret) { | ^~ drivers/net/wireless/intel/iwlwifi/mld/mac80211.c:478:13: note: 'ret' was declared here 478 | int ret; | ^~~ Hide the unused functions and make sure the 'ret' variable is not used before the initialization. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Jose Ignacio Tornos Martinez <[email protected]>
1 parent d76c750 commit c815f2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ int iwl_mld_mac80211_start(struct ieee80211_hw *hw)
501501
iwl_mld_restart_cleanup(mld);
502502
}
503503

504-
if (!in_d3 || ret) {
504+
if (!in_d3) {
505505
ret = iwl_mld_start_fw(mld);
506506
if (ret)
507507
goto error;
@@ -537,7 +537,8 @@ void iwl_mld_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
537537
/* if the suspend flow fails the fw is in error. Stop it here, and it
538538
* will be started upon wakeup
539539
*/
540-
if (!suspend || iwl_mld_no_wowlan_suspend(mld))
540+
if (!suspend ||
541+
(IS_ENABLED(CONFIG_PM_SLEEP) && iwl_mld_no_wowlan_suspend(mld)))
541542
iwl_mld_stop_fw(mld);
542543

543544
/* HW is stopped, no more coming RX. OTOH, the worker can't run as the
@@ -1943,6 +1944,7 @@ static void iwl_mld_sta_rc_update(struct ieee80211_hw *hw,
19431944
}
19441945
}
19451946

1947+
#ifdef CONFIG_PM_SLEEP
19461948
static void iwl_mld_set_wakeup(struct ieee80211_hw *hw, bool enabled)
19471949
{
19481950
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
@@ -1994,6 +1996,7 @@ static int iwl_mld_resume(struct ieee80211_hw *hw)
19941996

19951997
return 0;
19961998
}
1999+
#endif
19972000

19982001
static int iwl_mld_alloc_ptk_pn(struct iwl_mld *mld,
19992002
struct iwl_mld_sta *mld_sta,

0 commit comments

Comments
 (0)