Skip to contentSkip to conversation

wifi: iwlwifi: mld: Fix build with CONFIG_PM disabled

PATCH In review Guenter Roeck 2 participants 2 messages Apr 1, 2025 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: iwlwifi: mld: Fix build with CONFIG_PM disabled

If CONFIG_PM is disabled, the CONFIG_PM symbol is not defined. This results in

drivers/net/wireless/intel/iwlwifi/mld/iface.h:169:5: error:
"CONFIG_PM_SLEEP" is not defined, evaluates to 0

because the conditional uses #if instead of #ifdef. Using #ifdef fixes the problem.

Fixes d1e879ec600f9 ("wifi: iwlwifi: add iwlmld sub-driver")
Cc Miri Korenblit <[email protected]>
Cc Arnd Bergmann <[email protected]>

---
Maybe this has already been addressed. If so, sorry, I did not find it. I did not see thos fixed in Arnd's patch addressing the other PM_SLEEP related issues in the driver.

 drivers/net/wireless/intel/iwlwifi/mld/iface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mld/iface.h +1 -1
index d1d56b081bf6..ec14d0736cee 100644
@@ -166,7 +166,7 @@ struct iwl_mld_vif {
 
 	struct iwl_mld_emlsr emlsr;
 
-#if CONFIG_PM_SLEEP
+#ifdef CONFIG_PM_SLEEP
 	struct iwl_mld_wowlan_data wowlan_data;
 #endif
 #ifdef CONFIG_IWLWIFI_DEBUGFS
Signature · 1 line
2.45.2
#1 lore raw
Quoted 9 lines · Guenter Roeck

If CONFIG_PM is disabled, the CONFIG_PM symbol is not defined. This results in

drivers/net/wireless/intel/iwlwifi/mld/iface.h:169:5: error:
"CONFIG_PM_SLEEP" is not defined, evaluates to 0

because the conditional uses #if instead of #ifdef. Using #ifdef fixes the problem.

Quoted 9 lines
Fixes d1e879ec600f9 ("wifi: iwlwifi: add iwlmld sub-driver")
Cc Miri Korenblit <[email protected]>
Cc Arnd Bergmann <[email protected]>

---
Maybe this has already been addressed. If so, sorry, I did not find it. I did not see thos fixed in Arnd's patch addressing the other PM_SLEEP related issues in the driver.

Hadn't, except internally I'd fixed it a while ago, and now Miri sent my patch (same as yours) 20 minutes later ;-)

Thanks, I'll start getting things into the wireless tree soon.

johannes