public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: gregkh@linuxfoundation.org
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 04/21] staging: rtl8723bs: move function to file hal/odm_HWConfig.c
Date: Sat,  7 Aug 2021 11:47:56 +0200	[thread overview]
Message-ID: <c2bb14c3d32d3a654df95288751f0bc8cd6566b0.1628329348.git.fabioaiuto83@gmail.com> (raw)
In-Reply-To: <cover.1628329348.git.fabioaiuto83@gmail.com>

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>
---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 27 +++++++++++++++++++
 drivers/staging/rtl8723bs/hal/odm_RTL8723B.c | 28 --------------------
 drivers/staging/rtl8723bs/hal/odm_RTL8723B.h |  2 --
 3 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index 6d7b34fd595e..2d4d8d57ceeb 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -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,
diff --git a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c
index 325f2a7ae337..66bda505c01e 100644
--- a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c
+++ b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.c
@@ -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;
-}
diff --git a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h
index 752f180ebd46..12b3ca90a43d 100644
--- a/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h
+++ b/drivers/staging/rtl8723bs/hal/odm_RTL8723B.h
@@ -9,6 +9,4 @@
 
 #define	DM_DIG_MIN_NIC_8723	0x1C
 
-s8 odm_cck_rssi(u8 LNA_idx, u8 VGA_idx);
-
 #endif
-- 
2.20.1


  parent reply	other threads:[~2021-08-07  9:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07  9:47 [PATCH 00/21] staging: rtl8723b: remove some code related to other chips Fabio Aiuto
2021-08-07  9:47 ` [PATCH 01/21] staging: rtl8723bs: remove code related to unsupported MCS index values Fabio Aiuto
2021-08-07  9:47 ` [PATCH 02/21] staging: rtl8723bs: remove unneeded loop Fabio Aiuto
2021-08-07  9:47 ` [PATCH 03/21] staging: rtl8723bs: do some code cleaning in modified function Fabio Aiuto
2021-08-07  9:47 ` Fabio Aiuto [this message]
2021-08-07  9:47 ` [PATCH 05/21] staging: rtl8723bs: remove empty files Fabio Aiuto
2021-08-07  9:47 ` [PATCH 06/21] staging: rtl8723bs: remove wrapping static function Fabio Aiuto
2021-08-07  9:47 ` [PATCH 07/21] staging: rtl8723bs: beautify function ODM_PhyStatusQuery() Fabio Aiuto
2021-08-07  9:48 ` [PATCH 08/21] staging: rtl8723bs: fix right side of condition Fabio Aiuto
2021-08-07  9:48 ` [PATCH 09/21] staging: rtl8723bs: clean driver from unused RF paths Fabio Aiuto
2021-08-07  9:48 ` [PATCH 10/21] staging: rtl8723bs: remove unused macros Fabio Aiuto
2021-08-07  9:48 ` [PATCH 11/21] staging: rtl8723bs: remove unused struct member Fabio Aiuto
2021-08-07  9:48 ` [PATCH 12/21] staging: rtl8723bs: remove rf type branching (first patch) Fabio Aiuto
2021-08-07  9:48 ` [PATCH 13/21] staging: rtl8723bs: remove rf type branching (second patch) Fabio Aiuto
2021-08-07  9:48 ` [PATCH 14/21] staging: rtl8723bs: remove rf type branching (third patch) Fabio Aiuto
2021-08-07  9:48 ` [PATCH 15/21] staging: rtl8723bs: remove rf type branching (fourth patch) Fabio Aiuto
2021-08-07  9:48 ` [PATCH 16/21] staging: rtl8723bs: remove unused rtw_rf_config module param Fabio Aiuto
2021-08-07  9:48 ` [PATCH 17/21] staging: rtl8723bs: remove unused macro in include/hal_data.h Fabio Aiuto
2021-08-07  9:48 ` [PATCH 18/21] staging: rtl8723bs: remove RF_*TX enum Fabio Aiuto
2021-08-07  9:48 ` [PATCH 19/21] staging: rtl8723bs: use MAX_RF_PATH_NUM as ceiling to rf path index Fabio Aiuto
2021-08-07  9:48 ` [PATCH 20/21] staging: rtl8723bs: fix tx power tables size Fabio Aiuto
2021-08-07  9:48 ` [PATCH 21/21] staging: rtl8723bs: remove unused RF_*T*R enum Fabio Aiuto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2bb14c3d32d3a654df95288751f0bc8cd6566b0.1628329348.git.fabioaiuto83@gmail.com \
    --to=fabioaiuto83@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox