[PATCH 10/40] [SRU][Lunar/OEM-6.1] wifi: rtw89: phy: ignore warning of bb gain cfg_type 4

Koba Ko koba.ko at canonical.com
Thu Jan 12 06:36:49 UTC 2023


From: Ping-Ke Shih <pkshih at realtek.com>

BugLink: https://bugs.launchpad.net/bugs/2002601

The new BB parameters add new cfg_tpe 4 to improve performance of eFEM
modules (rfe_type >= 50), but we are using iFEM modules for now, so this
warning can be ignored.

Signed-off-by: Ping-Ke Shih <pkshih at realtek.com>
Signed-off-by: Kalle Valo <kvalo at kernel.org>
Link: https://lore.kernel.org/r/20220930133659.7789-2-pkshih@realtek.com
(cherry picked from commit c6a9d360874a41dc972c44c0949916da55199f85)
Signed-off-by: Koba Ko <koba.ko at canonical.com>
---
 drivers/net/wireless/realtek/rtw89/phy.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c
index 12a297f6bf50c..d9c4debecc622 100644
--- a/drivers/net/wireless/realtek/rtw89/phy.c
+++ b/drivers/net/wireless/realtek/rtw89/phy.c
@@ -1036,6 +1036,7 @@ static void rtw89_phy_config_bb_gain(struct rtw89_dev *rtwdev,
 {
 	const struct rtw89_chip_info *chip = rtwdev->chip;
 	union rtw89_phy_bb_gain_arg arg = { .addr = reg->addr };
+	struct rtw89_efuse *efuse = &rtwdev->efuse;
 
 	if (arg.gain_band >= RTW89_BB_GAIN_BAND_NR)
 		return;
@@ -1061,6 +1062,11 @@ static void rtw89_phy_config_bb_gain(struct rtw89_dev *rtwdev,
 	case 3:
 		rtw89_phy_cfg_bb_gain_op1db(rtwdev, arg, reg->data);
 		break;
+	case 4:
+		/* This cfg_type is only used by rfe_type >= 50 with eFEM */
+		if (efuse->rfe_type < 50)
+			break;
+		fallthrough;
 	default:
 		rtw89_warn(rtwdev,
 			   "bb gain {0x%x:0x%x} with unknown cfg type: %d\n",
-- 
2.34.1




More information about the kernel-team mailing list