mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-04 04:54:18 +00:00
36f6d6ddcd
Backport support for RTL8812AU/RTL8821AU USB adapters Manually backported patch: 045-v6.13-wifi-rtw88-Enable-the-new-RTL8821AU-RTL8812AU-driver Patches from 046 to 051 are pending. Signed-off-by: Marty Jones <mj8263788@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17079 [Move BPAUTO_WANT_DEV_COREDUMP to original patch] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
86 lines
3.3 KiB
Diff
86 lines
3.3 KiB
Diff
From abb0f19492ba6289ffba6ec1057c0426240958af Mon Sep 17 00:00:00 2001
|
|
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
|
Date: Wed, 23 Oct 2024 17:10:54 +0300
|
|
Subject: [PATCH] wifi: rtw88: Make txagc_remnant_ofdm an array
|
|
|
|
txagc_remnant_ofdm member of struct rtw_dm_info should be different for
|
|
each RF path, so make it an array of size RTW_RF_PATH_MAX (4).
|
|
|
|
Until now all the chips using this had only one RF path, but RTL8812AU
|
|
has two, and RTL8814AU has four.
|
|
|
|
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
|
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
Link: https://patch.msgid.link/68571ba9-e504-4b2d-bfa1-62f468753649@gmail.com
|
|
---
|
|
drivers/net/wireless/realtek/rtw88/main.h | 2 +-
|
|
drivers/net/wireless/realtek/rtw88/phy.c | 4 ++--
|
|
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 4 ++--
|
|
drivers/net/wireless/realtek/rtw88/rtw8723d.c | 4 ++--
|
|
4 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
|
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
|
@@ -1715,7 +1715,7 @@ struct rtw_dm_info {
|
|
bool pwr_trk_init_trigger;
|
|
struct ewma_thermal avg_thermal[RTW_RF_PATH_MAX];
|
|
s8 txagc_remnant_cck;
|
|
- s8 txagc_remnant_ofdm;
|
|
+ s8 txagc_remnant_ofdm[RTW_RF_PATH_MAX];
|
|
u8 rx_cck_agc_report_type;
|
|
|
|
/* backup dack results for each path and I/Q */
|
|
--- a/drivers/net/wireless/realtek/rtw88/phy.c
|
|
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
|
|
@@ -2169,8 +2169,8 @@ void rtw_get_tx_power_params(struct rtw_
|
|
|
|
*limit = rtw_phy_get_tx_power_limit(rtwdev, band, bw, path,
|
|
rate, ch, regd);
|
|
- *remnant = (rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck :
|
|
- dm_info->txagc_remnant_ofdm);
|
|
+ *remnant = rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck :
|
|
+ dm_info->txagc_remnant_ofdm[path];
|
|
*sar = rtw_phy_get_tx_power_sar(rtwdev, hal->sar_band, path, rate);
|
|
}
|
|
|
|
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
|
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
|
@@ -637,7 +637,7 @@ static void rtw8703b_pwrtrack_init(struc
|
|
dm_info->pwr_trk_init_trigger = true;
|
|
dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k;
|
|
dm_info->txagc_remnant_cck = 0;
|
|
- dm_info->txagc_remnant_ofdm = 0;
|
|
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = 0;
|
|
}
|
|
|
|
static void rtw8703b_phy_set_param(struct rtw_dev *rtwdev)
|
|
@@ -1589,7 +1589,7 @@ static void rtw8703b_pwrtrack_set_ofdm_p
|
|
{
|
|
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
|
|
|
- dm_info->txagc_remnant_ofdm = txagc_idx;
|
|
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = txagc_idx;
|
|
|
|
/* Only path A is calibrated for rtl8703b */
|
|
rtw8703b_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_A);
|
|
--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
|
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c
|
|
@@ -79,7 +79,7 @@ static void rtw8723d_pwrtrack_init(struc
|
|
dm_info->pwr_trk_init_trigger = true;
|
|
dm_info->thermal_meter_k = rtwdev->efuse.thermal_meter_k;
|
|
dm_info->txagc_remnant_cck = 0;
|
|
- dm_info->txagc_remnant_ofdm = 0;
|
|
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = 0;
|
|
}
|
|
|
|
static void rtw8723d_phy_set_param(struct rtw_dev *rtwdev)
|
|
@@ -1265,7 +1265,7 @@ static void rtw8723d_pwrtrack_set_ofdm_p
|
|
{
|
|
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
|
|
|
|
- dm_info->txagc_remnant_ofdm = txagc_idx;
|
|
+ dm_info->txagc_remnant_ofdm[RF_PATH_A] = txagc_idx;
|
|
|
|
rtw8723d_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_A);
|
|
rtw8723d_set_iqk_matrix(rtwdev, swing_idx, RF_PATH_B);
|