staging: r8188eu: move ODM_GetRightChnlPlaceforIQK()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jul 2021 09:24:08 +0000 (11:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jul 2021 14:10:39 +0000 (16:10 +0200)
ODM_GetRightChnlPlaceforIQK() is only called in one place, so move the
call to the single location and make the file static.

This lets us remove the hal/HalPhyRf.c and include/HalPhyRf.h files as
they are now empty.

Link: https://lore.kernel.org/r/20210730092417.1014392-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/Makefile
drivers/staging/r8188eu/hal/HalPhyRf.c [deleted file]
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
drivers/staging/r8188eu/include/HalPhyRf.h [deleted file]
drivers/staging/r8188eu/include/odm_precomp.h

index 6db1376..ea455b0 100644 (file)
@@ -28,7 +28,6 @@ OUTSRC_FILES :=                               \
                hal/HalHWImg8188E_MAC.o \
                hal/HalHWImg8188E_BB.o  \
                hal/HalHWImg8188E_RF.o  \
-               hal/HalPhyRf.o          \
                hal/HalPhyRf_8188e.o    \
                hal/HalPwrSeqCmd.o      \
                hal/Hal8188EPwrSeq.o    \
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf.c b/drivers/staging/r8188eu/hal/HalPhyRf.c
deleted file mode 100644 (file)
index e5a58ee..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
- #include "odm_precomp.h"
-
-/* 3============================================================ */
-/* 3 IQ Calibration */
-/* 3============================================================ */
-
-#define ODM_TARGET_CHNL_NUM_2G_5G      59
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
-{
-       u8      channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
-               1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
-               100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
-               124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
-               155, 157, 159, 161, 163, 165
-       };
-       u8      place = chnl;
-
-       if (chnl > 14) {
-               for (place = 14; place < sizeof(channel_all); place++) {
-                       if (channel_all[place] == chnl)
-                               return place-13;
-               }
-       }
-       return 0;
-}
index df9bd4c..8b34842 100644 (file)
@@ -1199,6 +1199,27 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t,
        ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_IQCalibrate_8188E() <==\n"));
 }
 
+#define ODM_TARGET_CHNL_NUM_2G_5G      59
+static u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
+{
+       u8      channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
+               1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
+               100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
+               124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
+               155, 157, 159, 161, 163, 165
+       };
+       u8      place = chnl;
+
+       if (chnl > 14) {
+               for (place = 14; place < sizeof(channel_all); place++) {
+                       if (channel_all[place] == chnl)
+                               return place-13;
+               }
+       }
+       return 0;
+}
+
 static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
 {
        u8 tmpreg;
diff --git a/drivers/staging/r8188eu/include/HalPhyRf.h b/drivers/staging/r8188eu/include/HalPhyRf.h
deleted file mode 100644 (file)
index ba877eb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __HAL_PHY_RF_H__
-#define __HAL_PHY_RF_H__
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
-
-#endif /*  #ifndef __HAL_PHY_RF_H__ */
index cec1035..7e5db89 100644 (file)
@@ -22,7 +22,6 @@
 #include "odm_RegDefine11AC.h"
 #include "odm_RegDefine11N.h"
 
-#include "HalPhyRf.h"
 #include "HalPhyRf_8188e.h"/* for IQK,LCK,Power-tracking */
 #include "Hal8188ERateAdaptive.h"/* for  RA,Power training */
 #include "rtl8188e_hal.h"