Linux wireless drivers development
 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 v12 2/3] wifi: rtw88: support channel switch in AP mode
Date: Wed, 18 Nov 2026 09:19:38 +0100	[thread overview]
Message-ID: <9BC4FC13-5723-4711-9798-11E3C285C7F1@linux.dev> (raw)
In-Reply-To: <20261117232624.1956815-3-mehmet.fide@gmail.com>

Hi Mehmet,

One more thing in addition to sashiko's comment.

On November 18, 2026 12:26:23 AM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:

> @@ -493,11 +513,17 @@ static void rtw_ops_stop_ap(struct ieee80211_hw *hw,
>       struct rtw_dev *rtwdev = hw->priv;
>
>       mutex_lock(&rtwdev->mutex);
> +     rtw_fw_csa_stop(rtwdev, vif);
>       rtw_write32_clr(rtwdev, REG_TCR, BIT_TCR_UPDATE_HGQMD);
>       rtw_write16(rtwdev, REG_ATIMWND, ATIMWND_DEFAULT);
>       rtwdev->ap_active = false;
> -     if (!rtw_core_check_sta_active(rtwdev))
> +     if (!rtw_core_check_sta_active(rtwdev)) {
>               rtw_clear_op_chan(rtwdev);
> +     } else {
> +             /* what a countdown may have held back */
> +             rtw_fw_download_rsvd_page(rtwdev);
> +             rtw_send_rsvd_page_h2c(rtwdev);
> +     }

As far as I can see, this check can still miss the station.
rtw_core_check_sta_active() uses rtw_iterate_vifs(), whose collecting
callback skips an interface if its GFP_ATOMIC allocation fails.

If the station associated after the last countdown download, its page
update was deferred above. Skipping that station here leaves the
countdown cancelled without refreshing those templates or sending their
locations to the firmware. There is no next work to carry the update.

I think the presence check is better fixed in
rtw_core_check_sta_active(). Its callback only reads interface state, so
could it use an atomic interface iterator without allocating entries?

Best regards,
Luka Gejak

  parent reply	other threads:[~2026-11-18  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 23:26 [PATCH rtw-next v12 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-11-17 23:26 ` [PATCH rtw-next v12 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-11-17 23:26 ` [PATCH rtw-next v12 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-11-18  7:55   ` Mehmet Fide
2026-11-18  8:19   ` Luka Gejak [this message]
2026-11-18  8:33     ` Mehmet Fide
2026-11-17 23:26 ` [PATCH rtw-next v12 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide

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=9BC4FC13-5723-4711-9798-11E3C285C7F1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox