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 v10 2/3] wifi: rtw88: support channel switch in AP mode
Date: Thu, 12 Nov 2026 12:46:39 +0100	[thread overview]
Message-ID: <F9A94BCB-D3DD-4ACB-AEA5-118611FCBE08@linux.dev> (raw)
In-Reply-To: <20261111121525.358041-3-mehmet.fide@gmail.com>

Hi Mehmet,

Thanks for the v10, the rtw_core_stop() change looks good to me. I just
have one comment below.

On November 11, 2026 1:15:24 PM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:

> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
> index 5e40cf06a9e3..e6c9866fd599 100644
> --- a/drivers/net/wireless/realtek/rtw88/mac80211.c
> +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c

[ ... ]

> @@ -438,6 +443,11 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
>               rtw_set_dtim_period(rtwdev, conf->dtim_period);
>               rtw_fw_download_rsvd_page(rtwdev);
>               rtw_send_rsvd_page_h2c(rtwdev);
> +             /* restart replay resumes it, a beacon without CSA ends it */
> +             if (conf->csa_active)
> +                     rtw_fw_csa_start(rtwdev, vif);
> +             else
> +                     rtw_fw_csa_stop(rtwdev, vif);
>       }

[ ... ]

> +static void rtw_ops_channel_switch_beacon(struct ieee80211_hw *hw,
> +                                       struct ieee80211_vif *vif,
> +                                       struct cfg80211_chan_def *chandef)
> +{
> +     struct rtw_dev *rtwdev = hw->priv;
> +
> +     mutex_lock(&rtwdev->mutex);
> +     rtw_fw_csa_start(rtwdev, vif);
> +     mutex_unlock(&rtwdev->mutex);
> +}

As far as I can see this op normally has nothing left to do.
__ieee80211_channel_switch() sets csa_active and sends the beacon change
before it calls the op:

        link_conf->csa_active = true;
        ...
        if (changed) {
                ieee80211_link_info_change_notify(sdata, link_data, changed);
                drv_channel_switch_beacon(sdata, &link_data->csa.chanreq.oper);
        }

For rtw88 changed is only set there when there is a CSA beacon, so it
always carries BSS_CHANGED_BEACON. The path above then starts every
countdown, not only the one after a restart, and in the normal flow
rtw_fw_csa_start() in the op returns early because csa_vif already
matches.

Maybe drop the op and say in the comment above that this path starts
the countdown? Or is it kept on purpose?

Best regards,
Luka Gejak

  reply	other threads:[~2026-11-12 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 12:15 [PATCH rtw-next v10 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-11-11 12:15 ` [PATCH rtw-next v10 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-11-11 12:15 ` [PATCH rtw-next v10 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-11-12 11:46   ` Luka Gejak [this message]
2026-11-11 12:15 ` [PATCH rtw-next v10 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-11-12 11:50   ` 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=F9A94BCB-D3DD-4ACB-AEA5-118611FCBE08@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