1 From 0e3e8284f8e1bf2fc0f7bf247194efe5cfc568c1 Mon Sep 17 00:00:00 2001
2 From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
3 Date: Wed, 30 Oct 2024 20:31:28 +0200
4 Subject: [PATCH] wifi: rtw88: Enable the new RTL8821AU/RTL8812AU drivers
6 These are older Wifi 5 chips. RTL8821AU is 1x1, with or without
7 Bluetooth. RTL8812AU is 2x2, without Bluetooth.
9 Beamforming is not implemented. It looks like these chips need a
10 different implementation than what is in bf.c.
12 Speed tests with RTL8821AU: 137 Mbps download, 144 Mbps upload.
13 Speed tests with RTL8812AU: 344 Mbps download, 387 Mbps upload.
15 Station mode and AP mode were tested.
17 Bluetooth coexistence works. I used my Bluetooth headphones for
18 several days, listening to music and watching videos. There is only
19 a problem with the wifi speeds with one router:
21 With ISP's HG6544C router:
22 Official driver: 3/5 Mbps.
23 rtw88: a bit more, but not steady at all. Not enough to watch a 1080p
26 With my D-Link Eagle R32 router running Openwrt, on the same channel:
27 Official driver: 6/10 Mbps.
28 rtw88: download starts around 30, climbs to 50 / upload is 10 Mbps.
29 I can watch a 1080p Youtube video.
31 The music doesn't cut out during any speed tests.
33 I also tested transferring files to and from my phone. I don't have
34 other types of Bluetooth devices to test.
36 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
37 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
38 Link: https://patch.msgid.link/0b8e8093-8103-4999-86bf-0055ec52ea64@gmail.com
40 Kconfig.local | 15 ++++++++
41 drivers/net/wireless/realtek/rtw88/Kconfig | 40 ++++++++++++++++++++-
42 drivers/net/wireless/realtek/rtw88/Makefile | 15 ++++++++
43 3 files changed, 69 insertions(+), 1 deletion(-)
47 @@ -1144,6 +1144,15 @@ config BACKPORTED_RTW88_8723D
48 config BACKPORTED_RTW88_8821C
51 +config BACKPORTED_RTW88_88XXA
54 +config BACKPORTED_RTW88_8821A
57 +config BACKPORTED_RTW88_8812A
60 config BACKPORTED_RTW88_8822BE
63 @@ -1183,6 +1192,12 @@ config BACKPORTED_RTW88_8821CS
64 config BACKPORTED_RTW88_8821CU
67 +config BACKPORTED_RTW88_8821AU
69 + default RTW88_8821AU
70 +config BACKPORTED_RTW88_8812AU
72 + default RTW88_8812AU
73 config BACKPORTED_RTW88_DEBUG
76 --- a/drivers/net/wireless/realtek/rtw88/Kconfig
77 +++ b/drivers/net/wireless/realtek/rtw88/Kconfig
78 @@ -54,6 +54,20 @@ config RTW88_8821C
97 tristate "Realtek 8822BE PCI wireless network adapter"
99 @@ -213,6 +227,30 @@ config RTW88_8821CU
101 802.11ac USB wireless network adapter
104 + tristate "Realtek 8821AU/8811AU USB wireless network adapter"
111 + Select this option will enable support for 8821AU and 8811AU chipset
113 + 802.11ac USB wireless network adapter
116 + tristate "Realtek 8812AU USB wireless network adapter"
123 + Select this option will enable support for 8812AU chipset
125 + 802.11ac USB wireless network adapter
128 bool "Realtek rtw88 debug support"
129 depends on RTW88_CORE
130 --- a/drivers/net/wireless/realtek/rtw88/Makefile
131 +++ b/drivers/net/wireless/realtek/rtw88/Makefile
132 @@ -77,6 +77,21 @@ rtw88_8821cs-objs := rtw8821cs.o
133 obj-$(CPTCFG_RTW88_8821CU) += rtw88_8821cu.o
134 rtw88_8821cu-objs := rtw8821cu.o
136 +obj-$(CPTCFG_RTW88_88XXA) += rtw88_88xxa.o
137 +rtw88_88xxa-objs := rtw88xxa.o
139 +obj-$(CPTCFG_RTW88_8821A) += rtw88_8821a.o
140 +rtw88_8821a-objs := rtw8821a.o rtw8821a_table.o
142 +obj-$(CPTCFG_RTW88_8812A) += rtw88_8812a.o
143 +rtw88_8812a-objs := rtw8812a.o rtw8812a_table.o
145 +obj-$(CPTCFG_RTW88_8821AU) += rtw88_8821au.o
146 +rtw88_8821au-objs := rtw8821au.o
148 +obj-$(CPTCFG_RTW88_8812AU) += rtw88_8812au.o
149 +rtw88_8812au-objs := rtw8812au.o
151 obj-$(CPTCFG_RTW88_PCI) += rtw88_pci.o
152 rtw88_pci-objs := pci.o