From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Bitterblue Smith" <rtl8821cerfe2@gmail.com>,
"Luka Gejak" <luka.gejak@linux.dev>,
"Ping-Ke Shih" <pkshih@realtek.com>
Cc: <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Michael Straube" <straube.linux@gmail.com>,
"Peter Robinson" <pbrobinson@gmail.com>
Subject: Re: [PATCH rtw-next v8 5/7] wifi: rtw88: 8723b: add the RTL8723B chip driver
Date: Fri, 09 Oct 2026 17:33:50 +0200 [thread overview]
Message-ID: <DM0F103PEZKZ.3BTGPMVOEZAUC@linux.dev> (raw)
In-Reply-To: <d95aacb8-0032-4d6c-b847-3103afbc3124@gmail.com>
On Fri Oct 9, 2026 at 2:40 PM CEST, Bitterblue Smith wrote:
> On 06/10/2026 16:06, Luka Gejak wrote:
>> Add the Realtek RTL8723B 802.11n chip driver: the chip operations, the
>> power sequences, the efuse layout, the RF and IQ calibration, and the
>> chip specific coexistence handling.
[...]
>> +{
>> + /*
>> + * The 8723B PHY status does not report the channel, so we must
>> + * mark it invalid to allow mac80211/rtw88 to parse it from the IE
>> + * during scanning.
>> + */
>> + pkt_stat->channel_invalid = true;
>
> After testing RTL8723BU for a bit, I think this is wrong.
>
> mac80211 thinks there is massive beacon loss when connected to a network
> with 40 MHz channel width, but phy_info in debugfs shows that beacons are
> being received. The beacons are handed over to mac80211 with a wrong
> frequency in struct ieee80211_rx_status. In my case, the correct frequency
> is 2472 MHz, but after rtw_update_rx_freq_from_ie() the frequency is set
> to 2462 MHz. mac80211 is probably discarding the beacons because of this.
> Removing this line fixes the problem.
>
> I think channel_invalid is only for chips which do hardware scan offload
> (RTL8822C). With the chips that only do software scanning the driver
> should always know what channel it's on and rtw_update_rx_freq_from_ie()
> is not needed.
>
You are right, and thanks for chasing this down.
The assignment causes it. With channel_invalid set, the frequency handed
to mac80211 comes from rtwdev->hal.current_channel, which
rtw_update_channel() sets to the center channel rather than the primary.
At 40 MHz those differ, so mac80211 drops the beacon in
ieee80211_rx_beacon_freq_valid(). Data frames are not checked, so
traffic keeps flowing and only beacon loss builds up.
On the RTL8723BS I could not reproduce it, because there the update is a
no-op. rtw_sdio_rx_skb() copies the status into skb->cb before it calls
rtw_update_rx_freq_for_invalid() and never copies it back, so the change
is discarded. usb.c and pci.c call it before their memcpy into skb->cb,
which is why you see it on the RTL8723BU. With the SDIO path made to
apply it I got your symptom exactly (2452 instead of 2462, beacon rx 0,
beacon loss 26, while rtw88 still counted the beacons), and removing
channel_invalid put it back to 2462 with no beacon loss.
I will send a patch removing the assignment and the comment above it.
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-10-09 15:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 13:06 [PATCH rtw-next v8 0/7] wifi: rtw88: add RTL8723B/RTL8723BS support Luka Gejak
2026-10-06 13:06 ` [PATCH rtw-next v8 1/7] wifi: rtw88: move the 88xxa CCK power detect setter to phy.c Luka Gejak
2026-10-08 2:52 ` Ping-Ke Shih
2026-10-06 13:06 ` [PATCH rtw-next v8 2/7] wifi: rtw88: 8723b: add the RTL8723B register definitions Luka Gejak
2026-10-06 13:06 ` [PATCH rtw-next v8 3/7] wifi: rtw88: 8723b: add the RTL8723B BB, RF and AGC tables Luka Gejak
2026-10-06 13:06 ` [PATCH rtw-next v8 4/7] wifi: rtw88: move the shared 8723x definitions to rtw8723x.h Luka Gejak
2026-10-07 2:38 ` Ping-Ke Shih
2026-10-06 13:06 ` [PATCH rtw-next v8 5/7] wifi: rtw88: 8723b: add the RTL8723B chip driver Luka Gejak
2026-10-07 2:57 ` Ping-Ke Shih
2026-10-07 8:24 ` Luka Gejak
2026-10-07 8:32 ` Ping-Ke Shih
2026-10-07 8:39 ` Luka Gejak
2026-10-07 8:54 ` Ping-Ke Shih
2026-10-07 10:06 ` Greg KH
2026-10-07 10:35 ` Luka Gejak
2026-10-10 10:18 ` Greg KH
2026-10-12 11:31 ` Luka Gejak
2026-10-09 12:40 ` Bitterblue Smith
2026-10-09 15:33 ` Luka Gejak [this message]
2026-10-06 13:07 ` [PATCH rtw-next v8 6/7] wifi: rtw88: 8723bs: add the RTL8723BS SDIO bind Luka Gejak
2026-10-06 13:07 ` [PATCH rtw-next v8 7/7] wifi: rtw88: 8723bs: enable building the RTL8723BS driver 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=DM0F103PEZKZ.3BTGPMVOEZAUC@linux.dev \
--to=luka.gejak@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pbrobinson@gmail.com \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=straube.linux@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.