From: Lukas Wunner <lukas@wunner.de>
To: "Korenblit, Miriam Rachel" <miriam.rachel.korenblit@intel.com>
Cc: "Berg, Johannes" <johannes.berg@intel.com>,
"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>,
"Berg, Benjamin" <benjamin.berg@intel.com>,
"Ben Shimol, Yedidya" <yedidya.ben.shimol@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
"Stern, Avraham" <avraham.stern@intel.com>,
"Gabay, Daniel" <daniel.gabay@intel.com>,
"Anjaneyulu, Pagadala Yesu" <pagadala.yesu.anjaneyulu@intel.com>,
"Triebitz, Shaul" <shaul.triebitz@intel.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] wifi: iwlwifi: mld: fix building with CONFIG_PM_SLEEP disabled
Date: Mon, 7 Apr 2025 09:09:03 +0200 [thread overview]
Message-ID: <Z_N6D9t5PV6ptXUN@wunner.de> (raw)
In-Reply-To: <MW5PR11MB581086E3DEFC1D6710892E68A3AA2@MW5PR11MB5810.namprd11.prod.outlook.com>
On Mon, Apr 07, 2025 at 06:42:47AM +0000, Korenblit, Miriam Rachel wrote:
> > From: Lukas Wunner <lukas@wunner.de>
> > 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
next prev parent reply other threads:[~2025-04-07 7:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-06 13:43 [PATCH v2] wifi: iwlwifi: mld: fix building with CONFIG_PM_SLEEP disabled Lukas Wunner
2025-04-07 6:42 ` Korenblit, Miriam Rachel
2025-04-07 7:09 ` Lukas Wunner [this message]
2025-04-08 8:56 ` Korenblit, Miriam Rachel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_N6D9t5PV6ptXUN@wunner.de \
--to=lukas@wunner.de \
--cc=arnd@arndb.de \
--cc=avraham.stern@intel.com \
--cc=benjamin.berg@intel.com \
--cc=daniel.gabay@intel.com \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pagadala.yesu.anjaneyulu@intel.com \
--cc=shaul.triebitz@intel.com \
--cc=yedidya.ben.shimol@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).