From: Kalle Valo <kvalo@kernel.org>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: <tony0620emma@gmail.com>, <Stable@vger.kernel.org>,
<pmw.gover@yahoo.co.uk>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH for-6.3] wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice
Date: Fri, 17 Feb 2023 09:33:43 +0000 (UTC) [thread overview]
Message-ID: <167662641796.23451.10955002465358149127.kvalo@kernel.org> (raw)
In-Reply-To: <20230216053633.20366-1-pkshih@realtek.com>
Ping-Ke Shih <pkshih@realtek.com> wrote:
> Use power state to decide whether we can enter or leave IPS accurately,
> and then prevent to power on/off twice.
>
> The commit 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS")
> would like to prevent this as well, but it still can't entirely handle all
> cases. The exception is that WiFi gets connected and does suspend/resume,
> it will power on twice and cause it failed to power on after resuming,
> like:
>
> rtw_8723de 0000:03:00.0: failed to poll offset=0x6 mask=0x2 value=0x2
> rtw_8723de 0000:03:00.0: mac power on failed
> rtw_8723de 0000:03:00.0: failed to power on mac
> rtw_8723de 0000:03:00.0: leave idle state failed
> rtw_8723de 0000:03:00.0: failed to leave ips state
> rtw_8723de 0000:03:00.0: failed to leave idle state
> rtw_8723de 0000:03:00.0: failed to send h2c command
>
> To fix this, introduce new flag RTW_FLAG_POWERON to reflect power state,
> and call rtw_mac_pre_system_cfg() to configure registers properly between
> power-off/-on.
>
> Reported-by: Paul Gover <pmw.gover@yahoo.co.uk>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217016
> Fixes: 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS")
> Cc: <Stable@vger.kernel.org>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-next.git, thanks.
4a267bc5ea8f wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230216053633.20366-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2023-02-17 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 5:36 [PATCH for-6.3] wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice Ping-Ke Shih
2023-02-17 9:33 ` Kalle Valo [this message]
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=167662641796.23451.10955002465358149127.kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=Stable@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=pmw.gover@yahoo.co.uk \
--cc=tony0620emma@gmail.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).