Re: [PATCH] staging: rtl8723bs: replace magic numbers with named constants
From: Luka Gejak
Date: Sat Apr 11 2026 - 13:21:18 EST
On Sat Apr 11, 2026 at 10:07 AM CEST, Dan Carpenter wrote:
> On Sat, Apr 11, 2026 at 10:58:17AM +0530, Adith-Joshua wrote:
>> Replace hardcoded magic numbers in rtl8723b_InitBeaconParameters()
>> with descriptive macros to improve readability and maintainability.
>>
>> No functional changes.
>>
>> Signed-off-by: Adith-Joshua <adithalex29@xxxxxxxxx>
>> ---
>
> Where did you find these numbers? Presumably there is a spec
> somewhere? What does BCNTCFG_CW mean? This really looks like an AI
> patch...
>
> regards,
> dan carpenter
Hi Dan,
I believe you are right about this patch being written by AI.
As I noted in my other reply, if you cross-reference these registers
with the primary upstream driver
(drivers/net/wireless/realtek/rtw88/reg.h), the field mappings
introduced in this patch are actually backwards. It looks like an AI saw
the 0x660F magic number and hallucinated that 0x66 was the aifs and 0x0F
was the cw, when in reality aifs occupies the lower 8 bits. It also
hallucinates an _MS suffix based on a loose code comment, completely
ignoring that 802.11 beacon offsets use time units (TU).
Best regards,
Luka Gejak