All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Mehmet Fide" <mehmet.fide@gmail.com>,
	"Ping-Ke Shih" <pkshih@realtek.com>
Cc: "Bitterblue Smith" <rtl8821cerfe2@gmail.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v9 2/3] wifi: rtw88: support channel switch in AP mode
Date: Fri, 30 Oct 2026 16:18:50 +0000	[thread overview]
Message-ID: <7ea86f5208f259f01ce8c18b7701f2a3e41e0fca@linux.dev> (raw)
In-Reply-To: <20261026152940.1274382-3-mehmet.fide@gmail.com>

Hi Mehmet,

Thanks for the v9, the resume part looks good to me. One comment below.

October 26, 2026 at 4:29 PM, "Mehmet Fide" <mehmet.fide@gmail.com> wrote:

> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index 0f23498b5c96..48e8cad221b9 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -1550,11 +1550,13 @@ void rtw_core_stop(struct rtw_dev *rtwdev)

[ ... ]

>       clear_bit(RTW_FLAG_FW_RUNNING, rtwdev->flags);
> +     rtwdev->csa_vif = NULL;
>
>       mutex_unlock(&rtwdev->mutex);
>
>       cancel_work_sync(&rtwdev->c2h_work);
>       cancel_work_sync(&rtwdev->update_beacon_work);
> +     cancel_delayed_work_sync(&rtwdev->csa_beacon_work);

I think there is a small window here that can leave a countdown stuck.
In the firmware recovery path this runs without the wiphy lock, so a
channel switch waiting on the mutex can get it while it is dropped here.
If its rtw_fw_csa_start() queues the work before the cancel above, the
work is cancelled but csa_vif stays set. The BSS_CHANGED_BEACON replay
after the restart then returns early, since csa_vif already matches, and
the countdown never finishes.

Maybe clear csa_vif again at the end of rtw_core_stop(), once the mutex
is taken back?

Best regards,
Luka Gejak

  reply	other threads:[~2026-10-30 16:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 15:29 [PATCH rtw-next v9 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-10-26 15:29 ` [PATCH rtw-next v9 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-10-26 15:29 ` [PATCH rtw-next v9 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-10-30 16:18   ` Luka Gejak [this message]
2026-10-26 15:29 ` [PATCH rtw-next v9 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-10-30 16:23   ` Luka Gejak

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=7ea86f5208f259f01ce8c18b7701f2a3e41e0fca@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mehmet.fide@gmail.com \
    --cc=mehmet.fide@screeningeagle.com \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@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 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.