Re: [PATCH rtw-next v2 1/2] wifi: rtw88: download the beacon the reserved page was built with

From: Mehmet Fide

Date: Thu Oct 01 2026 - 07:54:52 EST


Hi Luka,

On 2026-10-01 Luka Gejak wrote:
> beacon is written in that branch only, and the caller declares it without an
> initialiser while the free at the end frees whatever it holds. The first page
> always takes that branch today, but the caller cannot see that, so a later
> change in the build would free a stack value. Would you mind initialising it to
> NULL?

Yes, v3 initialises it in rtw_fw_download_rsvd_page(). That is the only
caller of rtw_build_rsvd_page(), so nothing else holds the out-pointer.

> The cover says this path is compile tested only. The feature comes from the
> firmware header rather than from the chip:
[...]
> so another firmware for the same hardware can reach it, and this is the path
> that v1 got wrong. Can it be run once on a device whose firmware has scan
> offload?

Agreed, it should run once. The feature word at offset 0x0c of the
firmware my dongles load is 0x7 for rtw8821c_fw.bin 24.11.0 and 0x0 for
rtw8822b_fw.bin 27.2.0, so neither has bit 8, while rtw8822c_fw.bin
9.9.15 carries 0x1e7. An RTL8822CU dongle is on its way here; v3 goes
out after the scan ran on it with the AP up, once without a countdown
(the download must keep the beacon) and once during one (the scan must
be refused).

Best regards,
Mehmet