mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Jeremy Fareau" <jeremy.fareau@gmail.com>,
	"Ping-Ke Shih" <pkshih@realtek.com>
Cc: <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Brian Norris" <briannorris@chromium.org>
Subject: Re: [PATCH wireless 1/2] wifi: rtw88: program the channel when the device is started
Date: Fri, 09 Oct 2026 14:12:20 +0200	[thread overview]
Message-ID: <DM0AQQ0P3D7K.1SIDA6SAMC3L2@linux.dev> (raw)
In-Reply-To: <20261007091225.413-2-jeremy.fareau@gmail.com>

On Wed Oct 7, 2026 at 11:12 AM CEST, Jeremy Fareau wrote:
> The chip is reset by power_off()/power_on(), but mac80211 only calls
> ieee80211_ops::config() when its own channel state changes.  After a
> stop/start cycle, such as
>
>     ip link set <dev> down
>     ip link set <dev> up
>

I don't think there is need to say what stop/start cycle is in commit
message.

> the channel is unchanged from mac80211's point of view, so the radio is
> never reprogrammed.  The device then listens on whatever channel the
> hardware came up on while iw reports the configured one, and receives
> almost nothing.
>
> Observed with an RTL8814AU (ALFA AWUS1900) in monitor mode on an
> aarch64 host.  A 25 s capture on channel 6 after a down/up cycle yields
> 3 frames, and 431 frames as soon as any real channel change is
> requested.  An RTL8812AU (Linksys WUSB6300) on the same host, the same
> channel and the same second yields 2438 frames.
>
> Program the channel in rtw_ops_start(), like rtw_ips_pwr_up() already
> does when leaving IPS.
>
> Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
> Assisted-by: LLM
> Signed-off-by: Jeremy Fareau <jeremy.fareau@gmail.com>
> ---
>  drivers/net/wireless/realtek/rtw88/mac80211.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
> index b01b98d24b0a..827f38390969 100644
> --- a/drivers/net/wireless/realtek/rtw88/mac80211.c
> +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
> @@ -57,6 +57,17 @@ static int rtw_ops_start(struct ieee80211_hw *hw)
>  
>  	mutex_lock(&rtwdev->mutex);
>  	ret = rtw_core_start(rtwdev);
> +
> +	/* The chip is reset by power_off()/power_on(), but mac80211 only calls
> +	 * ieee80211_ops::config() when its own channel state changes. After a
> +	 * stop/start cycle the channel is unchanged from mac80211's point of
> +	 * view, so the radio would never be reprogrammed and the device would
> +	 * receive nothing. Program it here, like rtw_ips_pwr_up() already does
> +	 * when leaving IPS.
> +	 */

We don't use that comment style anymore. Change it to:

/*
 * text
 * text
 */

Also that comment is rather extensive, maybe shorten it to something
like:

/*
 * The chip is reset by power_off() and power_on(), but mac80211 won't
 * call config() after stop/start since its channel state is unchanged.
 * Reprogram the channel here, as rtw_ips_pwr_up() does.
 */

> +	if (!ret && hw->conf.chandef.chan)
> +		rtw_set_channel(rtwdev);
> +
>  	mutex_unlock(&rtwdev->mutex);
>  
>  	return ret;

Besides that I noticed that there are many double spaces after
punctuation in commit message, so please fix that too. And
should this cc stable?

Best regards,
Luka Gejak

  reply	other threads:[~2026-10-09 12:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  9:12 [PATCH wireless 0/2] wifi: rtw88: channel and control frame filter lost on interface restart Jeremy Fareau
2026-10-07  9:12 ` [PATCH wireless 1/2] wifi: rtw88: program the channel when the device is started Jeremy Fareau
2026-10-09 12:12   ` Luka Gejak [this message]
2026-10-07  9:12 ` [PATCH wireless 2/2] wifi: rtw88: restore the control frame filter " Jeremy Fareau
2026-10-11 13:08   ` 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=DM0AQQ0P3D7K.1SIDA6SAMC3L2@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=briannorris@chromium.org \
    --cc=jeremy.fareau@gmail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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

all inboxes | Powered by JetHome®