Re: [PATCH] staging: rtl8723bs: replace magic numbers with named constants

From: Dan Carpenter

Date: Sun Apr 12 2026 - 08:59:20 EST


On Sat, Apr 11, 2026 at 08:04:56PM +0530, Adith Joshua wrote:
> Hi Dan,
>
> Thanks for taking a look at my patch.
>
> These values come from the RTL8723BS register layout(as in original vendor
> driver)
>
> For TBTT_PROHIBIT (0x6404), the register is split into two fields. The
> upper byte(0x64) is the TBTT prohibit hold time. The lower byte(0x04) is
> the setup/margin time before TBTT

Is this available online somewhere? I did manage to find TBTT_PROHIBIT
on google for the rtl8188e driver and the explanation is here:

https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/staging/rtl8188eu/include/rtl8188e_spec.h#296

It says that the "TBTT prohibit setup in unit of 32us." but the patch
says it is in units of ms so that's wrong.

>
> For BCNTCFG(0x660F) the upper byte(0x66) configures AIFS value for beacon
> transmission. The lower byte(0x0F) sets the contention window to the max
> value

I wasn't able to verify any of this. Please provide us a link to
your original vendor driver.

>
> The intention of this change was to replace the unclear hardcoded values
> with proper macros(like the todo said)
>
> If it is needed I’ll send a v2 with more explicit names and brief comments
> for the bit fields
>

*grumble* It's honestly, still not clear if you used AI to write the
patch or not.

regards,
dan carpenter