summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtw89/rtw8852c.c
diff options
context:
space:
mode:
authorChing-Te Ku <ku920601@realtek.com>2023-03-14 03:06:15 +0100
committerKalle Valo <kvalo@kernel.org>2023-04-03 15:35:36 +0200
commit20595db3c0681cc034e50fbcba85a1e6cf3325b5 (patch)
tree1dc146db58260b3286bc065b5dcd56764718f79a /drivers/net/wireless/realtek/rtw89/rtw8852c.c
parentwifi: rtw89: coex: Not to enable firmware report when WiFi is power saving (diff)
downloadlinux-20595db3c0681cc034e50fbcba85a1e6cf3325b5.tar.xz
linux-20595db3c0681cc034e50fbcba85a1e6cf3325b5.zip
wifi: rtw89: coex: Update RTL8852B LNA2 hardware parameter
The LNA gain didn't set before, it will lead some WiFi RX issue. And the setting can increase both of WiFi & BT performance while they are both RX. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230314020617.28193-4-pkshih@realtek.com
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/realtek/rtw89/rtw8852c.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
index 8af813132f71..758021287552 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
@@ -2633,20 +2633,25 @@ static void rtw8852c_set_wl_lna2(struct rtw89_dev *rtwdev, u8 level)
static void rtw8852c_btc_set_wl_rx_gain(struct rtw89_dev *rtwdev, u32 level)
{
+ struct rtw89_btc *btc = &rtwdev->btc;
+
switch (level) {
case 0: /* original */
+ default:
rtw8852c_bb_ctrl_btc_preagc(rtwdev, false);
- rtw8852c_set_wl_lna2(rtwdev, 0);
+ btc->dm.wl_lna2 = 0;
break;
case 1: /* for FDD free-run */
rtw8852c_bb_ctrl_btc_preagc(rtwdev, true);
- rtw8852c_set_wl_lna2(rtwdev, 0);
+ btc->dm.wl_lna2 = 0;
break;
case 2: /* for BTG Co-Rx*/
rtw8852c_bb_ctrl_btc_preagc(rtwdev, false);
- rtw8852c_set_wl_lna2(rtwdev, 1);
+ btc->dm.wl_lna2 = 1;
break;
}
+
+ rtw8852c_set_wl_lna2(rtwdev, btc->dm.wl_lna2);
}
static void rtw8852c_fill_freq_with_ppdu(struct rtw89_dev *rtwdev,