wok-current view linux/stuff/net-wireless-rtw88-8821c-support-RFE-type4-wifi-NIC.patch @ rev 25792
Fix openbox menu, label keymap on lxpanel and add miss it translation for tazpkg
| author | Stanislas Leduc <shann@slitaz.org> |
|---|---|
| date | Tue Oct 07 05:55:24 2025 +0000 (2 weeks ago) |
| parents | |
| children |
line source
1 From b789e3fe7047296be0ccdbb7ceb0b58856053572 Mon Sep 17 00:00:00 2001
2 From: Guo-Feng Fan <vincent_fann@realtek.com>
3 Date: Wed, 22 Sep 2021 10:36:36 +0800
4 Subject: rtw88: 8821c: support RFE type4 wifi NIC
6 RFE type4 is a new NIC which has one RF antenna shares with BT.
7 RFE type4 HW is the same as RFE type2 but attaching antenna to
8 aux antenna connector.
10 RFE type2 attach antenna to main antenna connector.
11 Load the same parameter as RFE type2 when initializing NIC.
13 Signed-off-by: Guo-Feng Fan <vincent_fann@realtek.com>
14 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
15 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
16 Link: https://lore.kernel.org/r/20210922023637.9357-1-pkshih@realtek.com
17 ---
18 drivers/net/wireless/realtek/rtw88/rtw8821c.c | 13 ++++++++++++-
19 1 file changed, 12 insertions(+), 1 deletion(-)
21 diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
22 index 349eef1a0ff24f..3effdf902f22fc 100644
23 --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
24 +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
25 @@ -305,7 +305,8 @@ static void rtw8821c_set_channel_rf(struct rtw_dev *rtwdev, u8 channel, u8 bw)
26 if (channel <= 14) {
27 if (rtwdev->efuse.rfe_option == 0)
28 rtw8821c_switch_rf_set(rtwdev, SWITCH_TO_WLG);
29 - else if (rtwdev->efuse.rfe_option == 2)
30 + else if (rtwdev->efuse.rfe_option == 2 ||
31 + rtwdev->efuse.rfe_option == 4)
32 rtw8821c_switch_rf_set(rtwdev, SWITCH_TO_BTG);
33 rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTDBG, BIT(6), 0x1);
34 rtw_write_rf(rtwdev, RF_PATH_A, 0x64, 0xf, 0xf);
35 @@ -774,6 +775,15 @@ static void rtw8821c_coex_cfg_ant_switch(struct rtw_dev *rtwdev, u8 ctrl_type,
36 if (switch_status == coex_dm->cur_switch_status)
37 return;
39 + if (coex_rfe->wlg_at_btg) {
40 + ctrl_type = COEX_SWITCH_CTRL_BY_BBSW;
41 +
42 + if (coex_rfe->ant_switch_polarity)
43 + pos_type = COEX_SWITCH_TO_WLA;
44 + else
45 + pos_type = COEX_SWITCH_TO_WLG_BT;
46 + }
47 +
48 coex_dm->cur_switch_status = switch_status;
50 if (coex_rfe->ant_switch_diversity &&
51 @@ -1499,6 +1509,7 @@ static const struct rtw_intf_phy_para_table phy_para_table_8821c = {
52 static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
53 [0] = RTW_DEF_RFE(8821c, 0, 0),
54 [2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
55 + [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
56 };
58 static struct rtw_hw_reg rtw8821c_dig[] = {
59 --
60 cgit 1.2.3-korg