From: Greg Kroah-Hartman Date: Thu, 30 Jun 2022 11:55:59 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v4.9.321~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aafd9f537c177c774d38cf836b94d53bd779ac2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: rtw88-8821c-support-rfe-type4-wifi-nic.patch rtw88-rtw8821c-enable-rfe-6-devices.patch --- diff --git a/queue-5.15/rtw88-8821c-support-rfe-type4-wifi-nic.patch b/queue-5.15/rtw88-8821c-support-rfe-type4-wifi-nic.patch new file mode 100644 index 00000000000..44b986da437 --- /dev/null +++ b/queue-5.15/rtw88-8821c-support-rfe-type4-wifi-nic.patch @@ -0,0 +1,62 @@ +From b789e3fe7047296be0ccdbb7ceb0b58856053572 Mon Sep 17 00:00:00 2001 +From: Guo-Feng Fan +Date: Wed, 22 Sep 2021 10:36:36 +0800 +Subject: rtw88: 8821c: support RFE type4 wifi NIC + +From: Guo-Feng Fan + +commit b789e3fe7047296be0ccdbb7ceb0b58856053572 upstream. + +RFE type4 is a new NIC which has one RF antenna shares with BT. +RFE type4 HW is the same as RFE type2 but attaching antenna to +aux antenna connector. + +RFE type2 attach antenna to main antenna connector. +Load the same parameter as RFE type2 when initializing NIC. + +Signed-off-by: Guo-Feng Fan +Signed-off-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20210922023637.9357-1-pkshih@realtek.com +Signed-off-by: Meng Tang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/realtek/rtw88/rtw8821c.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c ++++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c +@@ -304,7 +304,8 @@ static void rtw8821c_set_channel_rf(stru + if (channel <= 14) { + if (rtwdev->efuse.rfe_option == 0) + rtw8821c_switch_rf_set(rtwdev, SWITCH_TO_WLG); +- else if (rtwdev->efuse.rfe_option == 2) ++ else if (rtwdev->efuse.rfe_option == 2 || ++ rtwdev->efuse.rfe_option == 4) + rtw8821c_switch_rf_set(rtwdev, SWITCH_TO_BTG); + rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTDBG, BIT(6), 0x1); + rtw_write_rf(rtwdev, RF_PATH_A, 0x64, 0xf, 0xf); +@@ -777,6 +778,15 @@ static void rtw8821c_coex_cfg_ant_switch + if (switch_status == coex_dm->cur_switch_status) + return; + ++ if (coex_rfe->wlg_at_btg) { ++ ctrl_type = COEX_SWITCH_CTRL_BY_BBSW; ++ ++ if (coex_rfe->ant_switch_polarity) ++ pos_type = COEX_SWITCH_TO_WLA; ++ else ++ pos_type = COEX_SWITCH_TO_WLG_BT; ++ } ++ + coex_dm->cur_switch_status = switch_status; + + if (coex_rfe->ant_switch_diversity && +@@ -1502,6 +1512,7 @@ static const struct rtw_intf_phy_para_ta + static const struct rtw_rfe_def rtw8821c_rfe_defs[] = { + [0] = RTW_DEF_RFE(8821c, 0, 0), + [2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2), ++ [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2), + }; + + static struct rtw_hw_reg rtw8821c_dig[] = { diff --git a/queue-5.15/rtw88-rtw8821c-enable-rfe-6-devices.patch b/queue-5.15/rtw88-rtw8821c-enable-rfe-6-devices.patch new file mode 100644 index 00000000000..ec8d2bffa11 --- /dev/null +++ b/queue-5.15/rtw88-rtw8821c-enable-rfe-6-devices.patch @@ -0,0 +1,39 @@ +From e109e3617e5d563b431a52e6e2f07f0fc65a93ae Mon Sep 17 00:00:00 2001 +From: Ping-Ke Shih +Date: Thu, 6 Jan 2022 20:47:39 -0600 +Subject: rtw88: rtw8821c: enable rfe 6 devices + +From: Ping-Ke Shih + +commit e109e3617e5d563b431a52e6e2f07f0fc65a93ae upstream. + +Ping-Ke Shih answered[1] a question for a user about an rtl8821ce device that +reported RFE 6, which the driver did not support. Ping-Ke suggested a possible +fix, but the user never reported back. + +A second user discovered the above thread and tested the proposed fix. +Accordingly, I am pushing this change, even though I am not the author. + +[1] https://lore.kernel.org/linux-wireless/3f5e2f6eac344316b5dd518ebfea2f95@realtek.com/ + +Signed-off-by: Ping-Ke Shih +Reported-and-tested-by: masterzorag +Signed-off-by: Larry Finger +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20220107024739.20967-1-Larry.Finger@lwfinger.net +Signed-off-by: Meng Tang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c ++++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c +@@ -1513,6 +1513,7 @@ static const struct rtw_rfe_def rtw8821c + [0] = RTW_DEF_RFE(8821c, 0, 0), + [2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2), + [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2), ++ [6] = RTW_DEF_RFE(8821c, 0, 0), + }; + + static struct rtw_hw_reg rtw8821c_dig[] = { diff --git a/queue-5.15/series b/queue-5.15/series index 82abb850ff5..ff5883ae1f5 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -22,3 +22,5 @@ fs-add-i_user_ns-helper.patch fs-support-mapped-mounts-of-mapped-filesystems.patch fs-fix-acl-translation.patch fs-account-for-group-membership.patch +rtw88-8821c-support-rfe-type4-wifi-nic.patch +rtw88-rtw8821c-enable-rfe-6-devices.patch