staging: rtl8723bs: fix type issue in DYNAMIC_BB_DYNAMIC_TXPWR

Add explicit cast to fix -Werror=overflow warning for BIT(2) usage
in DYNAMIC_BB_DYNAMIC_TXPWR

Suggested-by: Nikolay Kulikov <nikolayof23@gmail.com>
Signed-off-by: Michael Steinmötzger <m.steinmoetzger@gmail.com>
Link: https://patch.msgid.link/20260511044029.14839-1-m.steinmoetzger@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Steinmötzger 2026-05-11 06:40:29 +02:00 committed by Greg Kroah-Hartman
parent 6a620bb2f4
commit 6abf0b2df0
3 changed files with 3 additions and 4 deletions

View File

@ -1450,13 +1450,13 @@ void update_IOT_info(struct adapter *padapter)
pmlmeinfo->turboMode_cts2self = 0;
pmlmeinfo->turboMode_rtsen = 1;
/* disable high power */
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
Switch_DM_Func(padapter, ((u32)(~DYNAMIC_BB_DYNAMIC_TXPWR)), false);
break;
case HT_IOT_PEER_REALTEK:
/* rtw_write16(padapter, 0x4cc, 0xffff); */
/* rtw_write16(padapter, 0x546, 0x01c0); */
/* disable high power */
Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
Switch_DM_Func(padapter, ((u32)(~DYNAMIC_BB_DYNAMIC_TXPWR)), false);
break;
default:
pmlmeinfo->turboMode_cts2self = 0;

View File

@ -14,7 +14,6 @@
#include <osdep_service_linux.h>
#define BIT2 0x00000004
extern int RTW_STATUS_CODE(int error_code);

View File

@ -28,7 +28,7 @@
/* ====== ODM_ABILITY_E ======== */
/* BB ODM section BIT 0-15 */
#define DYNAMIC_BB_DIG BIT(0) /* ODM_BB_DIG */
#define DYNAMIC_BB_DYNAMIC_TXPWR BIT2 /* ODM_BB_DYNAMIC_TXPWR */
#define DYNAMIC_BB_DYNAMIC_TXPWR BIT(2) /* ODM_BB_DYNAMIC_TXPWR */
#define DYNAMIC_BB_ANT_DIV BIT(6) /* ODM_BB_ANT_DIV */
/* RF ODM section BIT 24-31 */