You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.7 KiB
68 lines
2.7 KiB
From b78b8b0d588655977715ddcdb4c9fc4711b802ef Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
Date: Wed, 24 May 2023 15:00:32 +0200
|
|
Subject: [PATCH 081/142] wifi: rtw89: 8852c: rfk: correct DPK settings
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Bugzilla: https://bugzilla.redhat.com/2207499
|
|
|
|
commit 21b5f159a2ee47d30f418559f6ece0088c80199f
|
|
Author: Ping-Ke Shih <pkshih@realtek.com>
|
|
Date: Fri Dec 9 10:09:39 2022 +0800
|
|
|
|
wifi: rtw89: 8852c: rfk: correct DPK settings
|
|
|
|
Some DPK settings are wrong, and causes bad TX performance occasionally.
|
|
So, fix them by internal suggestions.
|
|
|
|
Fixes: da4cea16cb13 ("rtw89: 8852c: rfk: add DPK")
|
|
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
|
Link: https://lore.kernel.org/r/20221209020940.9573-3-pkshih@realtek.com
|
|
|
|
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
---
|
|
drivers/net/wireless/realtek/rtw89/reg.h | 2 ++
|
|
drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 9 ++++-----
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h
|
|
index 5324e645728bb..ca6f6c3e63095 100644
|
|
--- a/drivers/net/wireless/realtek/rtw89/reg.h
|
|
+++ b/drivers/net/wireless/realtek/rtw89/reg.h
|
|
@@ -3671,6 +3671,8 @@
|
|
#define RR_TXRSV_GAPK BIT(19)
|
|
#define RR_BIAS 0x5e
|
|
#define RR_BIAS_GAPK BIT(19)
|
|
+#define RR_TXAC 0x5f
|
|
+#define RR_TXAC_IQG GENMASK(3, 0)
|
|
#define RR_BIASA 0x60
|
|
#define RR_BIASA_TXG GENMASK(15, 12)
|
|
#define RR_BIASA_TXA GENMASK(19, 16)
|
|
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c
|
|
index f5b0b57f33207..f3a07b0e672f7 100644
|
|
--- a/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c
|
|
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c
|
|
@@ -1872,12 +1872,11 @@ static void _dpk_rf_setting(struct rtw89_dev *rtwdev, u8 gain,
|
|
0x50101 | BIT(rtwdev->dbcc_en));
|
|
rtw89_write_rf(rtwdev, path, RR_MOD_V1, RR_MOD_MASK, RF_DPK);
|
|
|
|
- if (dpk->bp[path][kidx].band == RTW89_BAND_6G && dpk->bp[path][kidx].ch >= 161) {
|
|
+ if (dpk->bp[path][kidx].band == RTW89_BAND_6G && dpk->bp[path][kidx].ch >= 161)
|
|
rtw89_write_rf(rtwdev, path, RR_IQGEN, RR_IQGEN_BIAS, 0x8);
|
|
- rtw89_write_rf(rtwdev, path, RR_LOGEN, RR_LOGEN_RPT, 0xd);
|
|
- } else {
|
|
- rtw89_write_rf(rtwdev, path, RR_LOGEN, RR_LOGEN_RPT, 0xd);
|
|
- }
|
|
+
|
|
+ rtw89_write_rf(rtwdev, path, RR_LOGEN, RR_LOGEN_RPT, 0xd);
|
|
+ rtw89_write_rf(rtwdev, path, RR_TXAC, RR_TXAC_IQG, 0x8);
|
|
|
|
rtw89_write_rf(rtwdev, path, RR_RXA2, RR_RXA2_ATT, 0x0);
|
|
rtw89_write_rf(rtwdev, path, RR_TXIQK, RR_TXIQK_ATT2, 0x3);
|
|
--
|
|
2.13.6
|
|
|