mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
staging: r8188eu: remove dead code from odm.c
(pDM_Odm->SupportICType & ODM_IC_11N_SERIES) is true in this driver. There is an if statement that checks this. Remove it and its never executed else arm. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
15774b84ab
commit
b706bf2921
1 changed files with 54 additions and 68 deletions
|
@ -739,84 +739,70 @@ void odm_FalseAlarmCounterStatistics(struct odm_dm_struct *pDM_Odm)
|
|||
if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))
|
||||
return;
|
||||
|
||||
if (pDM_Odm->SupportICType & ODM_IC_11N_SERIES) {
|
||||
/* hold ofdm counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 1); /* hold page C counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 1); /* hold page D counter */
|
||||
/* hold ofdm counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 1); /* hold page C counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 1); /* hold page D counter */
|
||||
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE1_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Fast_Fsync = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_SB_Search_fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE2_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_OFDM_CCA = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_Parity_Fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE3_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Rate_Illegal = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_Crc8_fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE4_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Mcs_fail = (ret_value & 0xffff);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE1_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Fast_Fsync = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_SB_Search_fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE2_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_OFDM_CCA = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_Parity_Fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE3_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Rate_Illegal = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_Crc8_fail = ((ret_value & 0xffff0000) >> 16);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE4_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_Mcs_fail = (ret_value & 0xffff);
|
||||
|
||||
FalseAlmCnt->Cnt_Ofdm_fail = FalseAlmCnt->Cnt_Parity_Fail + FalseAlmCnt->Cnt_Rate_Illegal +
|
||||
FalseAlmCnt->Cnt_Crc8_fail + FalseAlmCnt->Cnt_Mcs_fail +
|
||||
FalseAlmCnt->Cnt_Fast_Fsync + FalseAlmCnt->Cnt_SB_Search_fail;
|
||||
FalseAlmCnt->Cnt_Ofdm_fail = FalseAlmCnt->Cnt_Parity_Fail + FalseAlmCnt->Cnt_Rate_Illegal +
|
||||
FalseAlmCnt->Cnt_Crc8_fail + FalseAlmCnt->Cnt_Mcs_fail +
|
||||
FalseAlmCnt->Cnt_Fast_Fsync + FalseAlmCnt->Cnt_SB_Search_fail;
|
||||
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8188E) {
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_SC_CNT_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_BW_LSC = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_BW_USC = ((ret_value & 0xffff0000) >> 16);
|
||||
}
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8188E) {
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_SC_CNT_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_BW_LSC = (ret_value & 0xffff);
|
||||
FalseAlmCnt->Cnt_BW_USC = ((ret_value & 0xffff0000) >> 16);
|
||||
}
|
||||
|
||||
/* hold cck counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(12), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(14), 1);
|
||||
/* hold cck counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(12), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(14), 1);
|
||||
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_LSB_11N, bMaskByte0);
|
||||
FalseAlmCnt->Cnt_Cck_fail = ret_value;
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_MSB_11N, bMaskByte3);
|
||||
FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff) << 8;
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_LSB_11N, bMaskByte0);
|
||||
FalseAlmCnt->Cnt_Cck_fail = ret_value;
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_MSB_11N, bMaskByte3);
|
||||
FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff) << 8;
|
||||
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_CCA_CNT_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_CCK_CCA = ((ret_value & 0xFF) << 8) | ((ret_value & 0xFF00) >> 8);
|
||||
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_CCA_CNT_11N, bMaskDWord);
|
||||
FalseAlmCnt->Cnt_CCK_CCA = ((ret_value & 0xFF) << 8) | ((ret_value & 0xFF00) >> 8);
|
||||
|
||||
FalseAlmCnt->Cnt_all = (FalseAlmCnt->Cnt_Fast_Fsync +
|
||||
FalseAlmCnt->Cnt_SB_Search_fail +
|
||||
FalseAlmCnt->Cnt_Parity_Fail +
|
||||
FalseAlmCnt->Cnt_Rate_Illegal +
|
||||
FalseAlmCnt->Cnt_Crc8_fail +
|
||||
FalseAlmCnt->Cnt_Mcs_fail +
|
||||
FalseAlmCnt->Cnt_Cck_fail);
|
||||
FalseAlmCnt->Cnt_all = (FalseAlmCnt->Cnt_Fast_Fsync +
|
||||
FalseAlmCnt->Cnt_SB_Search_fail +
|
||||
FalseAlmCnt->Cnt_Parity_Fail +
|
||||
FalseAlmCnt->Cnt_Rate_Illegal +
|
||||
FalseAlmCnt->Cnt_Crc8_fail +
|
||||
FalseAlmCnt->Cnt_Mcs_fail +
|
||||
FalseAlmCnt->Cnt_Cck_fail);
|
||||
|
||||
FalseAlmCnt->Cnt_CCA_all = FalseAlmCnt->Cnt_OFDM_CCA + FalseAlmCnt->Cnt_CCK_CCA;
|
||||
FalseAlmCnt->Cnt_CCA_all = FalseAlmCnt->Cnt_OFDM_CCA + FalseAlmCnt->Cnt_CCK_CCA;
|
||||
|
||||
if (pDM_Odm->SupportICType >= ODM_RTL8723A) {
|
||||
/* reset false alarm counter registers */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTC_11N, BIT(31), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTC_11N, BIT(31), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(27), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(27), 0);
|
||||
/* update ofdm counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 0); /* update page C counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 0); /* update page D counter */
|
||||
if (pDM_Odm->SupportICType >= ODM_RTL8723A) {
|
||||
/* reset false alarm counter registers */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTC_11N, BIT(31), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTC_11N, BIT(31), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(27), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(27), 0);
|
||||
/* update ofdm counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 0); /* update page C counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 0); /* update page D counter */
|
||||
|
||||
/* reset CCK CCA counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(13) | BIT(12), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(13) | BIT(12), 2);
|
||||
/* reset CCK FA counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(15) | BIT(14), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(15) | BIT(14), 2);
|
||||
}
|
||||
} else { /* FOR ODM_IC_11AC_SERIES */
|
||||
/* read OFDM FA counter */
|
||||
FalseAlmCnt->Cnt_Ofdm_fail = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_11AC, bMaskLWord);
|
||||
FalseAlmCnt->Cnt_Cck_fail = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_11AC, bMaskLWord);
|
||||
FalseAlmCnt->Cnt_all = FalseAlmCnt->Cnt_Ofdm_fail + FalseAlmCnt->Cnt_Cck_fail;
|
||||
|
||||
/* reset OFDM FA coutner */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RST_11AC, BIT(17), 1);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RST_11AC, BIT(17), 0);
|
||||
/* reset CCK FA counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11AC, BIT(15), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11AC, BIT(15), 1);
|
||||
/* reset CCK CCA counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(13) | BIT(12), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(13) | BIT(12), 2);
|
||||
/* reset CCK FA counter */
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(15) | BIT(14), 0);
|
||||
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(15) | BIT(14), 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue