staging: r8188eu: remove some dead code
authorMichael Straube <straube.linux@gmail.com>
Fri, 8 Oct 2021 17:26:21 +0000 (19:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Oct 2021 12:57:22 +0000 (14:57 +0200)
In this driver SupportICType is ODM_RTL8188E and SupportInterface is
ODM_ITRF_USB. Remove an if statement that is never true and remove
function odm_DIGbyRSSI_LPS() which is used only in this dead if block.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211008172621.8721-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/odm.c
drivers/staging/r8188eu/include/odm.h

index d15d62927db1ed1b8066c4694850e180d213759e..acab7ddb9e99d001550df49e9a1346f591b31f5c 100644 (file)
@@ -186,17 +186,7 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm)
        odm_FalseAlarmCounterStatistics(pDM_Odm);
        odm_RSSIMonitorCheck(pDM_Odm);
 
-       /* For CE Platform(SPRD or Tablet) */
-       /* 8723A or 8189ES platform */
-       /* NeilChen--2012--08--24-- */
-       /* Fix Leave LPS issue */
-       if ((pDM_Odm->Adapter->pwrctrlpriv.pwr_mode != PS_MODE_ACTIVE) &&/*  in LPS mode */
-           ((pDM_Odm->SupportICType & (ODM_RTL8723A)) ||
-           (pDM_Odm->SupportICType & (ODM_RTL8188E) &&
-           ((pDM_Odm->SupportInterface  == ODM_ITRF_SDIO)))))
-               odm_DIGbyRSSI_LPS(pDM_Odm);
-       else
-               odm_DIG(pDM_Odm);
+       odm_DIG(pDM_Odm);
        odm_CCKPacketDetectionThresh(pDM_Odm);
 
        if (*pDM_Odm->pbPowerSaving)
@@ -453,53 +443,6 @@ void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI)
        }
 }
 
-/* Need LPS mode for CE platform --2012--08--24--- */
-/* 8723AS/8189ES */
-void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm)
-{
-       struct adapter *pAdapter = pDM_Odm->Adapter;
-       struct false_alarm_stats *pFalseAlmCnt = &pDM_Odm->FalseAlmCnt;
-
-       u8 RSSI_Lower = DM_DIG_MIN_NIC;   /* 0x1E or 0x1C */
-       u8 bFwCurrentInPSMode = false;
-       u8 CurrentIGI = pDM_Odm->RSSI_Min;
-
-       if (!(pDM_Odm->SupportICType & (ODM_RTL8723A | ODM_RTL8188E)))
-               return;
-
-       CurrentIGI = CurrentIGI + RSSI_OFFSET_DIG;
-       bFwCurrentInPSMode = pAdapter->pwrctrlpriv.bFwCurrentInPSMode;
-
-       /*  Using FW PS mode to make IGI */
-       if (bFwCurrentInPSMode) {
-               /* Adjust by  FA in LPS MODE */
-               if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH2_LPS)
-                       CurrentIGI = CurrentIGI + 2;
-               else if (pFalseAlmCnt->Cnt_all > DM_DIG_FA_TH1_LPS)
-                       CurrentIGI = CurrentIGI + 1;
-               else if (pFalseAlmCnt->Cnt_all < DM_DIG_FA_TH0_LPS)
-                       CurrentIGI = CurrentIGI - 1;
-       } else {
-               CurrentIGI = RSSI_Lower;
-       }
-
-       /* Lower bound checking */
-
-       /* RSSI Lower bound check */
-       if ((pDM_Odm->RSSI_Min - 10) > DM_DIG_MIN_NIC)
-               RSSI_Lower = (pDM_Odm->RSSI_Min - 10);
-       else
-               RSSI_Lower = DM_DIG_MIN_NIC;
-
-       /* Upper and Lower Bound checking */
-       if (CurrentIGI > DM_DIG_MAX_NIC)
-               CurrentIGI = DM_DIG_MAX_NIC;
-       else if (CurrentIGI < RSSI_Lower)
-               CurrentIGI = RSSI_Lower;
-
-       ODM_Write_DIG(pDM_Odm, CurrentIGI);/* ODM_Write_DIG(pDM_Odm, pDM_DigTable->CurIGValue); */
-}
-
 void odm_DIGInit(struct odm_dm_struct *pDM_Odm)
 {
        struct rtw_dig *pDM_DigTable = &pDM_Odm->DM_DigTable;
index 2a65c3dfad3ad5f7eea09181ff478149f3b3ffef..398038d5252dd1cccbc277c91e09bbb2222d5781 100644 (file)
@@ -4,18 +4,6 @@
 #ifndef        __HALDMOUTSRC_H__
 #define __HALDMOUTSRC_H__
 
-/*  */
-/* 3 PSD Handler */
-/* 3============================================================ */
-
-/*  LPS define */
-#define DM_DIG_FA_TH0_LPS              4 /*  4 in lps */
-#define DM_DIG_FA_TH1_LPS              15 /*  15 lps */
-#define DM_DIG_FA_TH2_LPS              30 /*  30 lps */
-#define RSSI_OFFSET_DIG                        0x05;
-
-/*  structure and define */
-
 /*  Add for AP/ADSLpseudo DM structuer requirement. */
 /*  We need to remove to other position??? */
 struct rtl8192cd_priv {
@@ -970,8 +958,6 @@ u32 ConvertTo_dB(u32 Value);
 u32 GetPSDData(struct odm_dm_struct *pDM_Odm, unsigned int point,
               u8 initial_gain_psd);
 
-void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm);
-
 u32 ODM_Get_Rate_Bitmap(struct odm_dm_struct *pDM_Odm, u32 macid,
                        u32 ra_mask, u8 rssi_level);