diff options
author | Guo-Feng Fan <vincent_fann@realtek.com> | 2021-09-22 10:36:37 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-24 14:22:33 +0300 |
commit | 5db4943a9d6fc6bf1b04f80416236594713067b4 (patch) | |
tree | 5e5cd22636b385c33506f096ba03559fb18c2571 /drivers/net/wireless/realtek | |
parent | b789e3fe7047296be0ccdbb7ceb0b58856053572 (diff) | |
download | linux-5db4943a9d6fc6bf1b04f80416236594713067b4.tar.bz2 |
rtw88: 8821c: correct 2.4G tx power for type 2/4 NIC
NIC card saves calibrated TX power index in the efuse(ROM).
Driver loads TX power idex when interface is up.
The problem is type2/4 NICs loads 2.4G TX power index
from wrong position. This patch corrects the offsets.
So, driver loads real 2.4G TX power index for type 2/4 NICs.
2.4G performance increased when using correct TX power index.
Signed-off-by: Guo-Feng Fan <vincent_fann@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210922023637.9357-2-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/rtw8821c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c index 3effdf902f22..80a6f4da6acd 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c @@ -61,6 +61,9 @@ static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) for (i = 0; i < 4; i++) efuse->txpwr_idx_table[i] = map->txpwr_idx_table[i]; + if (rtwdev->efuse.rfe_option == 2 || rtwdev->efuse.rfe_option == 4) + efuse->txpwr_idx_table[0].pwr_idx_2g = map->txpwr_idx_table[1].pwr_idx_2g; + switch (rtw_hci_type(rtwdev)) { case RTW_HCI_TYPE_PCIE: rtw8821ce_efuse_parsing(efuse, map); |