staging: r8188eu: make odm_CCKPacketDetectionThresh() static
authorMichael Straube <straube.linux@gmail.com>
Wed, 29 Dec 2021 20:50:59 +0000 (21:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Dec 2021 11:02:26 +0000 (12:02 +0100)
Function odm_CCKPacketDetectionThresh() is only used in odm.c.
Make it static.

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

index 6e3325721c7bb7fb6876b8519f62ec80330154ff..88ce6675fb309ecf17acfb87d3661735867862b9 100644 (file)
@@ -429,6 +429,33 @@ static void odm_FalseAlarmCounterStatistics(struct odm_dm_struct *pDM_Odm)
        FalseAlmCnt->Cnt_CCA_all = FalseAlmCnt->Cnt_OFDM_CCA + FalseAlmCnt->Cnt_CCK_CCA;
 }
 
+static void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
+{
+       u8 CurCCK_CCAThres;
+       struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;
+
+       if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD | ODM_BB_FA_CNT)))
+               return;
+       if (pDM_Odm->bLinked) {
+               if (pDM_Odm->RSSI_Min > 25) {
+                       CurCCK_CCAThres = 0xcd;
+               } else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) {
+                       CurCCK_CCAThres = 0x83;
+               } else {
+                       if (FalseAlmCnt->Cnt_Cck_fail > 1000)
+                               CurCCK_CCAThres = 0x83;
+                       else
+                               CurCCK_CCAThres = 0x40;
+               }
+       } else {
+               if (FalseAlmCnt->Cnt_Cck_fail > 1000)
+                       CurCCK_CCAThres = 0x83;
+               else
+                       CurCCK_CCAThres = 0x40;
+       }
+       ODM_Write_CCK_CCA_Thres(pDM_Odm, CurCCK_CCAThres);
+}
+
 /* 3 Export Interface */
 
 /*  2011/09/21 MH Add to describe different team necessary resource allocate?? */
@@ -563,37 +590,6 @@ void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI)
        }
 }
 
-/* 3============================================================ */
-/* 3 CCK Packet Detect Threshold */
-/* 3============================================================ */
-
-void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
-{
-       u8 CurCCK_CCAThres;
-       struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;
-
-       if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD | ODM_BB_FA_CNT)))
-               return;
-       if (pDM_Odm->bLinked) {
-               if (pDM_Odm->RSSI_Min > 25) {
-                       CurCCK_CCAThres = 0xcd;
-               } else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) {
-                       CurCCK_CCAThres = 0x83;
-               } else {
-                       if (FalseAlmCnt->Cnt_Cck_fail > 1000)
-                               CurCCK_CCAThres = 0x83;
-                       else
-                               CurCCK_CCAThres = 0x40;
-               }
-       } else {
-               if (FalseAlmCnt->Cnt_Cck_fail > 1000)
-                       CurCCK_CCAThres = 0x83;
-               else
-                       CurCCK_CCAThres = 0x40;
-       }
-       ODM_Write_CCK_CCA_Thres(pDM_Odm, CurCCK_CCAThres);
-}
-
 void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres)
 {
        struct rtw_dig *pDM_DigTable = &pDM_Odm->DM_DigTable;
index de95948c7325e9dd9da8dad1ceacccf17098adca..71f3cd6eb9cd7c01a758d80f225e098a5eecbbb1 100644 (file)
@@ -33,7 +33,6 @@
 
 void odm_TXPowerTrackingInit(struct odm_dm_struct *pDM_Odm);
 void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm);
-void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm);
 void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm);
 void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm);
 void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm);