summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/hal/odm_DIG.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-19 08:51:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-19 08:51:32 -0700
commitbea8d77e45a8b77f2beca1affc9aa7ed28f39b17 (patch)
treed8b2decebcc2b6b58bc2df244c89b77a4f2ce2c7 /drivers/staging/rtl8723bs/hal/odm_DIG.c
parent99ef60d119f3b2621067dd5fc1ea4a37360709e4 (diff)
parentbf9c95f3eeefb7fc4b4a6380cc23f1dca744e379 (diff)
downloadlinux-master.tar.gz
linux-master.zip
Merge tag 'staging-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingHEADmaster
Pull staging driver updates from Greg KH: "Here is the "big" set of staging driver changes for 7.1-rc1. Nothing major in here at all, just lots of little cleanups for the staging drivers, driven by new developers getting their feet wet in kernel development. "Largest" thing in here is the change of some of the octeon variable types into proper kernel ones. Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (154 commits) staging: rtl8723bs: remove redundant & parentheses staging: most: dim2: replace BUG_ON() in poison_channel() staging: most: dim2: replace BUG_ON() in enqueue() staging: most: dim2: replace BUG_ON() in configure_channel() staging: most: dim2: replace BUG_ON() in service_done_flag() staging: most: dim2: replace BUG_ON() in try_start_dim_transfer() staging: rtl8723bs: remove unused RTL8188E antenna selection macros staging: rtl8723bs: remove redundant blank lines in basic_types.h staging: rtl8723bs: wrap complex macros with parentheses staging: rtl8723bs: remove unused WRITEEF/READEF byte macros staging: rtl8723bs: rename camelCase variable staging: greybus: audio: fix error message for BTN_3 button staging: rtl8723bs: rename variables to snake_case staging: rtl8723bs: fix spelling in comment staging: rtl8723bs: cleanup return in sdio_init() staging: rtl8723bs: use direct returns in sdio_dvobj_init() staging: rtl8723bs: remove unused arg at odm_interface.h greybus: raw: fix use-after-free if write is called after disconnect greybus: raw: fix use-after-free on cdev close staging: rtl8723bs: fix logical continuations in xmit_linux.c ...
Diffstat (limited to 'drivers/staging/rtl8723bs/hal/odm_DIG.c')
-rw-r--r--drivers/staging/rtl8723bs/hal/odm_DIG.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c
index f10427abd849..a31c8368f9d9 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DIG.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c
@@ -220,9 +220,8 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
s8 Diff, IGI_target;
bool EDCCA_State = false;
- if (!(pDM_Odm->SupportAbility & ODM_BB_ADAPTIVITY)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_ADAPTIVITY))
return;
- }
if (*pDM_Odm->pBandWidth == ODM_BW20M) /* CHANNEL_WIDTH_20 */
IGI_target = pDM_Odm->IGI_Base;
@@ -286,23 +285,21 @@ void ODM_Write_DIG(void *pDM_VOID, u8 CurrentIGI)
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
- if (pDM_DigTable->bStopDIG) {
+ if (pDM_DigTable->bStopDIG)
return;
- }
if (pDM_DigTable->CurIGValue != CurrentIGI) {
/* 1 Check initial gain by upper bound */
if (!pDM_DigTable->bPSDInProgress) {
- if (CurrentIGI > pDM_DigTable->rx_gain_range_max) {
+ if (CurrentIGI > pDM_DigTable->rx_gain_range_max)
CurrentIGI = pDM_DigTable->rx_gain_range_max;
- }
}
/* 1 Set IGI value */
- PHY_SetBBReg(pDM_Odm->Adapter, ODM_REG(IGI_A, pDM_Odm), ODM_BIT(IGI, pDM_Odm), CurrentIGI);
+ PHY_SetBBReg(pDM_Odm->Adapter, ODM_REG(IGI_A), ODM_BIT(IGI), CurrentIGI);
- PHY_SetBBReg(pDM_Odm->Adapter, ODM_REG(IGI_B, pDM_Odm), ODM_BIT(IGI, pDM_Odm), CurrentIGI);
+ PHY_SetBBReg(pDM_Odm->Adapter, ODM_REG(IGI_B), ODM_BIT(IGI), CurrentIGI);
pDM_DigTable->CurIGValue = CurrentIGI;
}
@@ -314,24 +311,20 @@ bool odm_DigAbort(void *pDM_VOID)
struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
/* SupportAbility */
- if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))
return true;
- }
/* SupportAbility */
- if (!(pDM_Odm->SupportAbility & ODM_BB_DIG)) {
+ if (!(pDM_Odm->SupportAbility & ODM_BB_DIG))
return true;
- }
/* ScanInProcess */
- if (*(pDM_Odm->pbScanInProcess)) {
+ if (*(pDM_Odm->pbScanInProcess))
return true;
- }
/* add by Neil Chen to avoid PSD is processing */
- if (pDM_Odm->bDMInitialGainEnable == false) {
+ if (pDM_Odm->bDMInitialGainEnable == false)
return true;
- }
return false;
}
@@ -343,7 +336,7 @@ void odm_DIGInit(void *pDM_VOID)
pDM_DigTable->bStopDIG = false;
pDM_DigTable->bPSDInProgress = false;
- pDM_DigTable->CurIGValue = (u8) PHY_QueryBBReg(pDM_Odm->Adapter, ODM_REG(IGI_A, pDM_Odm), ODM_BIT(IGI, pDM_Odm));
+ pDM_DigTable->CurIGValue = (u8) PHY_QueryBBReg(pDM_Odm->Adapter, ODM_REG(IGI_A), ODM_BIT(IGI));
pDM_DigTable->RssiLowThresh = DM_DIG_THRESH_LOW;
pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH;
pDM_DigTable->FALowThresh = DMfalseALARM_THRESH_LOW;
@@ -413,9 +406,9 @@ void odm_DIG(void *pDM_VOID)
if (pDM_Odm->bLinked && bPerformance) {
/* 2 Modify DIG upper bound */
/* 4 Modify DIG upper bound for 92E, 8723A\B, 8821 & 8812 BT */
- if (pDM_Odm->bBtLimitedDig == 1) {
+ if (pDM_Odm->bBtLimitedDig == 1)
offset = 10;
- } else
+ else
offset = 15;
if ((pDM_Odm->RSSI_Min + offset) > dm_dig_max)
@@ -475,9 +468,8 @@ void odm_DIG(void *pDM_VOID)
}
/* 2 Abnormal lower bound case */
- if (pDM_DigTable->rx_gain_range_min > pDM_DigTable->rx_gain_range_max) {
+ if (pDM_DigTable->rx_gain_range_min > pDM_DigTable->rx_gain_range_max)
pDM_DigTable->rx_gain_range_min = pDM_DigTable->rx_gain_range_max;
- }
/* 1 False alarm threshold decision */
@@ -814,7 +806,7 @@ void ODM_Write_CCK_CCA_Thres(void *pDM_VOID, u8 CurCCK_CCAThres)
/* modify by Guo.Mingzhi 2012-01-03 */
if (pDM_DigTable->CurCCK_CCAThres != CurCCK_CCAThres)
- rtw_write8(pDM_Odm->Adapter, ODM_REG(CCK_CCA, pDM_Odm), CurCCK_CCAThres);
+ rtw_write8(pDM_Odm->Adapter, ODM_REG(CCK_CCA), CurCCK_CCAThres);
pDM_DigTable->PreCCK_CCAThres = pDM_DigTable->CurCCK_CCAThres;
pDM_DigTable->CurCCK_CCAThres = CurCCK_CCAThres;