Re: [PATCH] staging: rtl8723bs: replace magic number in InitBeaconParameters

From: Greg Kroah-Hartman

Date: Sat Jul 11 2026 - 01:12:16 EST


On Sat, Jul 11, 2026 at 08:10:06AM +0530, Ananthan wrote:
> Per the bitfield comment in hal_com_reg.h, REG_TBTT_PROHIBIT packs
> a "setup" time in bits 3:0 and a "hold" time in bits 19:8. The
> rtw_write16() call here only writes the low 16 bits of that
> register, covering the full setup field and the low byte of the
> hold field.
>
> Replace the magic number 0x6404 with two named constants
> representing these fields.
>
> No functional change.
>
> Signed-off-by: Ananthan <ananthanr.off@xxxxxxxxx>

We need a full name please.

> ---
> drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index bcaf63b2893c..9609ae025736 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -11,6 +11,9 @@
> #include <rtl8723b_hal.h>
> #include "hal_com_h2c.h"
>
> +#define TBTT_PROHIBIT_SETUP 0x04 /* bits 3:0: setup time, unit 32us */
> +#define TBTT_PROHIBIT_HOLD_LOW 0x64 /* bits 15:8: low byte of 12-bit hold time, unit 32us */

Where did that information come from? Please document that.

thanks,

greg k-h