staging: rtl8723bs: move function to file hal/odm_HWConfig.c
authorFabio Aiuto <fabioaiuto83@gmail.com>
Sat, 7 Aug 2021 09:47:56 +0000 (11:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Aug 2021 10:12:18 +0000 (12:12 +0200)
move function odm_cck_rssi() to hal/odm_HWConfig.c.
As it is used only in this file turn it to
static.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c2bb14c3d32d3a654df95288751f0bc8cd6566b0.1628329348.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/odm_HWConfig.c
drivers/staging/rtl8723bs/hal/odm_RTL8723B.c
drivers/staging/rtl8723bs/hal/odm_RTL8723B.h

index 6d7b34f..2d4d8d5 100644 (file)
@@ -71,6 +71,33 @@ static u8 odm_evm_db_to_percentage(s8 value)
        return ret_val;
 }
 
+static s8 odm_cck_rssi(u8 lna_idx, u8 vga_idx)
+{
+       s8 rx_pwr_all = 0x00;
+
+       switch (lna_idx) {
+       /* 46  53 73 95 201301231630 */
+       /*  46 53 77 99 201301241630 */
+
+       case 6:
+               rx_pwr_all = -34 - (2 * vga_idx);
+               break;
+       case 4:
+               rx_pwr_all = -14 - (2 * vga_idx);
+               break;
+       case 1:
+               rx_pwr_all = 6 - (2 * vga_idx);
+               break;
+       case 0:
+               rx_pwr_all = 16 - (2 * vga_idx);
+               break;
+       default:
+               /* rx_pwr_all = -53+(2*(31-VGA_idx)); */
+               break;
+       }
+       return rx_pwr_all;
+}
+
 static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
                                      struct odm_phy_info *phy_info,
                                      u8 *phy_status,
index 325f2a7..66bda50 100644 (file)
@@ -6,31 +6,3 @@
  ******************************************************************************/
 
 #include "odm_precomp.h"
-
-s8 odm_cck_rssi(u8 lna_idx, u8 vga_idx)
-{
-       s8 rx_pwr_all = 0x00;
-
-       switch (lna_idx) {
-       /* 46  53 73 95 201301231630 */
-       /*  46 53 77 99 201301241630 */
-
-       case 6:
-               rx_pwr_all = -34 - (2 * vga_idx);
-               break;
-       case 4:
-               rx_pwr_all = -14 - (2 * vga_idx);
-               break;
-       case 1:
-               rx_pwr_all = 6 - (2 * vga_idx);
-               break;
-       case 0:
-               rx_pwr_all = 16 - (2 * vga_idx);
-               break;
-       default:
-               /* rx_pwr_all = -53+(2*(31-VGA_idx)); */
-               break;
-
-       }
-       return rx_pwr_all;
-}
index 752f180..12b3ca9 100644 (file)
@@ -9,6 +9,4 @@
 
 #define        DM_DIG_MIN_NIC_8723     0x1C
 
-s8 odm_cck_rssi(u8 LNA_idx, u8 VGA_idx);
-
 #endif