From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Gongwei Li <13875017792@163.com>
Cc: linux-staging@lists.linux.dev, Hans de Goede <hansg@kernel.org>,
Dan Carpenter <error27@gmail.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Gongwei Li <ligongwei@kylinos.cn>
Subject: Re: [PATCH] staging: rtl8723bs: fix scan-abort timeout in rtw_scan_abort()
Date: Wed, 30 Sep 2026 06:38:04 +0200 [thread overview]
Message-ID: <2026093048-thrive-phoney-5b9e@gregkh> (raw)
In-Reply-To: <20260930015024.3627275-1-13875017792@163.com>
On Wed, Sep 30, 2026 at 09:50:24AM +0800, Gongwei Li wrote:
> From: Gongwei Li <ligongwei@kylinos.cn>
>
> rtw_scan_abort() checks jiffies_to_msecs(start) <= 200, but start holds
> an absolute jiffies value, so this converts the time since boot rather
> than the elapsed time. Once the system has been up for more than 200ms
> the condition is always false and the loop never waits for an ongoing
> scan to finish.
>
> Use jiffies_to_msecs(jiffies - start) to get the real elapsed time.
>
> Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index d18768a51b19..d4beff59f272 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -931,7 +931,7 @@ void rtw_scan_abort(struct adapter *adapter)
> start = jiffies;
> pmlmeext->scan_abort = true;
> while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)
> - && jiffies_to_msecs(start) <= 200) {
> + && jiffies_to_msecs(jiffies - start) <= 200) {
> if (adapter->driver_stopped || adapter->bSurpriseRemoved)
> break;
>
How was this found and tested?
thanks,
greg k-h
next prev parent reply other threads:[~2026-09-30 4:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 1:50 [PATCH] staging: rtl8723bs: fix scan-abort timeout in rtw_scan_abort() Gongwei Li
2026-09-30 4:38 ` Greg Kroah-Hartman [this message]
2026-09-30 6:27 ` Gongwei Li
2026-09-30 6:38 ` Greg Kroah-Hartman
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=2026093048-thrive-phoney-5b9e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=13875017792@163.com \
--cc=error27@gmail.com \
--cc=hansg@kernel.org \
--cc=ligongwei@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.