> -----Original Message----- > From: Lukas Wunner <lukas@xxxxxxxxx> > Sent: Monday, 7 April 2025 10:09 > To: Korenblit, Miriam Rachel <miriam.rachel.korenblit@xxxxxxxxx> > Cc: Berg, Johannes <johannes.berg@xxxxxxxxx>; Grumbach, Emmanuel > <emmanuel.grumbach@xxxxxxxxx>; Berg, Benjamin <benjamin.berg@xxxxxxxxx>; > Ben Shimol, Yedidya <yedidya.ben.shimol@xxxxxxxxx>; Arnd Bergmann > <arnd@xxxxxxxx>; Stern, Avraham <avraham.stern@xxxxxxxxx>; Gabay, Daniel > <daniel.gabay@xxxxxxxxx>; Anjaneyulu, Pagadala Yesu > <pagadala.yesu.anjaneyulu@xxxxxxxxx>; Triebitz, Shaul > <shaul.triebitz@xxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx > Subject: Re: [PATCH v2] wifi: iwlwifi: mld: fix building with CONFIG_PM_SLEEP > disabled > > On Mon, Apr 07, 2025 at 06:42:47AM +0000, Korenblit, Miriam Rachel wrote: > > > From: Lukas Wunner <lukas@xxxxxxxxx> > > > Sent: Sunday, 6 April 2025 16:44 > [...] > > > --- a/drivers/net/wireless/intel/iwlwifi/mld/d3.h > > > +++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.h > > > @@ -34,6 +34,7 @@ struct iwl_mld_wowlan_data { > > > struct iwl_mld_rekey_data rekey_data; }; > > > > > > +#ifdef CONFIG_PM_SLEEP > > > int iwl_mld_no_wowlan_resume(struct iwl_mld *mld); int > > > iwl_mld_no_wowlan_suspend(struct iwl_mld *mld); int > > > iwl_mld_wowlan_suspend(struct iwl_mld *mld, @@ -47,5 +48,8 @@ void > > > iwl_mld_ipv6_addr_change(struct ieee80211_hw *hw, > > > struct ieee80211_vif *vif, > > > struct inet6_dev *idev); > > > #endif > > > +#else > > > +static inline int iwl_mld_no_wowlan_suspend(struct iwl_mld *mld) { > > > +return 0; > > > > You are not supposed to get to this function not under the ifdef. > > So if you do, I'd return an error value, not 0? > > No. This code section of iwl_mld_mac80211_stop()... > > /* if the suspend flow fails the fw is in error. Stop it here, and it > * will be started upon wakeup > */ > if (!suspend || iwl_mld_no_wowlan_suspend(mld)) > iwl_mld_stop_fw(mld); > > ...would unconditionally call iwl_mld_stop_fw() if the empty inline stub of > iwl_mld_no_wowlan_suspend() returned an error value. > > That doesn't seem to be the desired behavior here, judging by the code > comment: Apparently iwl_mld_stop_fw() is only supposed to be called if the > firmware "is in error". So returning 0 is very much intentional. > > Thanks, > > Lukas Acked-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>