Skip to contentSkip to conversation

rtw89: add Realtek 802.11ax driver

PATCH In review Ping-Ke Shih 3 participants 33 messages Oct 8, 2021 – Oct 13, 2021 Realtek wireless driver (rtw89) Page 4 of 4

lore
Share & tools
lore
author maintainer
#26 lore raw

PATCH v7 24/24 rtw89: add Kconfig and Makefile

In reply to Ping-Ke Shih

With Kconfig and Makefile, we can build rtw89 and support 8852AE chip.

---
 drivers/net/wireless/realtek/Kconfig        |  1 +
 drivers/net/wireless/realtek/Makefile       |  1 +
 drivers/net/wireless/realtek/rtw89/Kconfig  | 50 +++++++++++++++++++++
 drivers/net/wireless/realtek/rtw89/Makefile | 25 +++++++++++
 4 files changed, 77 insertions(+)
 create mode 100644 drivers/net/wireless/realtek/rtw89/Kconfig
 create mode 100644 drivers/net/wireless/realtek/rtw89/Makefile
drivers/net/wireless/realtek/Kconfig +1 -0
index 474843277fa1..4a1f0e64df03 100644
@@ -16,5 +16,6 @@ source "drivers/net/wireless/realtek/rtl818x/Kconfig"
 source "drivers/net/wireless/realtek/rtlwifi/Kconfig"
 source "drivers/net/wireless/realtek/rtl8xxxu/Kconfig"
 source "drivers/net/wireless/realtek/rtw88/Kconfig"
+source "drivers/net/wireless/realtek/rtw89/Kconfig"
 
 endif # WLAN_VENDOR_REALTEK
drivers/net/wireless/realtek/Makefile +1 -0
index 888b5d594e79..ab25419f56c6 100644
@@ -8,4 +8,5 @@ obj-$(CONFIG_RTL8187)		+= rtl818x/
 obj-$(CONFIG_RTLWIFI)		+= rtlwifi/
 obj-$(CONFIG_RTL8XXXU)		+= rtl8xxxu/
 obj-$(CONFIG_RTW88)		+= rtw88/
+obj-$(CONFIG_RTW89)		+= rtw89/
 
drivers/net/wireless/realtek/rtw89/Kconfig new file +50 -0

50 lines not on this page · raw message

drivers/net/wireless/realtek/rtw89/Makefile new file +25 -0
new file mode 100644
index 000000000000..077e8fe23f60
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+
+obj-$(CONFIG_RTW89_CORE) += rtw89_core.o
+rtw89_core-y += core.o \
+		mac80211.o \
+		mac.o \
+		phy.o \
+		fw.o \
+		rtw8852a.o \
+		rtw8852a_table.o \
+		rtw8852a_rfk.o \
+		rtw8852a_rfk_table.o \
+		cam.o \
+		efuse.o \
+		regd.o \
+		sar.o \
+		coex.o \
+		ps.o \
+		ser.o
+
+rtw89_core-$(CONFIG_RTW89_DEBUG) += debug.o
+
+obj-$(CONFIG_RTW89_PCI) += rtw89_pci.o
+rtw89_pci-y := pci.o
+
Signature · 1 line
2.25.1
#27 lore raw
In reply to Ping-Ke Shih
Quoted 43 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

Quoted 2 lines
    https://github.com/pkshih/linux-firmware.git 
    pick the commit 6595133a7cde82be932067afde834dcd036167f8

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Are there more Tested-by or Reviewed-by tags?

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#28 lore raw
Quoted 51 lines · Kalle Valo
Quoted 43 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

Quoted 2 lines
    https://github.com/pkshih/linux-firmware.git 
    pick the commit 6595133a7cde82be932067afde834dcd036167f8

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

Quoted 6 lines

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Are there more Tested-by or Reviewed-by tags?

I now created one big commit which I'm planning to take to wireless-drivers-next:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=80b361279546ca7a57c7e7844c2e23f474f9852d

Please double check that I didn't break anything while squashing the patches. I tried to be careful, but you never know.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author maintainer Tested-by Aaron Ma
#29 lore raw
Quoted 59 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Kalle Valo
Sent: Monday, October 11, 2021 8:07 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 48 lines · Kalle Valo
Quoted 45 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

    https://github.com/pkshih/linux-firmware.git
    pick the commit 6595133a7cde82be932067afde834dcd036167f8
Quoted 11 lines
Quoted 4 lines

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=
pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

Quoted 5 lines

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Are there more Tested-by or Reviewed-by tags?

Sorry for the late reply. Because our National Day is Oct. 10th, and additional holiday on Oct. 11th.

Aaron have tested v5 and a tag is given [1].

Quoted 10 lines

I now created one big commit which I'm planning to take to wireless-drivers-next:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=
pending&id=80b361279546ca7a57c7e7844c2e23f474f9852d

Please double check that I didn't break anything while squashing the patches. I tried to be careful, but you never know.

I have confirmed the squashed patch is identical to v7 I sent. Thank you.

[1] https://lore.kernel.org/linux-wireless/[email protected]/

--
Ping-Ke

#30 lore raw
Quoted 69 lines · Pkshih
Quoted 69 lines

-----Original Message-----
From: [email protected] <[email protected]> On
Behalf Of Kalle Valo
Sent: Monday, October 11, 2021 8:07 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 48 lines · Kalle Valo
Quoted 43 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

Quoted 2 lines
    https://github.com/pkshih/linux-firmware.git
    pick the commit 6595133a7cde82be932067afde834dcd036167f8
Quoted 4 lines

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=
pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

Quoted 4 lines

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Are there more Tested-by or Reviewed-by tags?

Sorry for the late reply. Because our National Day is Oct. 10th, and additional holiday on Oct. 11th.

Aaron have tested v5 and a tag is given [1].

I added Aaron to the commit log and pushed the driver to the master branch:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd

So the driver is now officially accepted, a big thank you to everyone who participated with the review and testing! Now let's see what kind of reports we get from linux-next.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author maintainer
#31 lore raw
Quoted 93 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Kalle Valo
Sent: Wednesday, October 13, 2021 2:09 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 59 lines · Pkshih
Quoted 59 lines

-----Original Message-----
From: [email protected] <[email protected]> On
Behalf Of Kalle Valo
Sent: Monday, October 11, 2021 8:07 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 48 lines · Kalle Valo
Quoted 45 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

    https://github.com/pkshih/linux-firmware.git
    pick the commit 6595133a7cde82be932067afde834dcd036167f8
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=

Quoted 5 lines
Quoted 5 lines

pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

Quoted 4 lines

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Are there more Tested-by or Reviewed-by tags?

Sorry for the late reply. Because our National Day is Oct. 10th, and additional holiday on Oct. 11th.

Aaron have tested v5 and a tag is given [1].

I added Aaron to the commit log and pushed the driver to the master branch:

Quoted 7 lines

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id
=e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd

So the driver is now officially accepted, a big thank you to everyone who participated with the review and testing! Now let's see what kind of reports we get from linux-next.

Thank you!

Should I add myself to the file MAINTAINERS?

--
Ping-Ke

#32 lore raw
Quoted 96 lines · Pkshih
Quoted 96 lines

-----Original Message-----
From: [email protected] <[email protected]> On
Behalf Of Kalle Valo
Sent: Wednesday, October 13, 2021 2:09 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 59 lines · Pkshih
Quoted 59 lines

-----Original Message-----
From: [email protected] <[email protected]> On
Behalf Of Kalle Valo
Sent: Monday, October 11, 2021 8:07 PM
To: Pkshih <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v7 00/24] rtw89: add Realtek 802.11ax driver

Quoted 48 lines · Kalle Valo
Quoted 45 lines · Ping-Ke Shih

This driver named rtw89, which is the next generation of rtw88, supports Realtek 8852AE 802.11ax 2x2 chip whose new features are OFDMA, DBCC, Spatial reuse, TWT and BSS coloring; now some of them aren't implemented though.

The chip architecture is entirely different from the chips supported by rtw88 like RTL8822CE 802.11ac chip. First of all, register address ranges are totally redefined, so it's impossible to reuse register definition. To communicate with firmware, new H2C/C2H format is proposed. In order to have better utilization, TX DMA flow is changed to two stages DMA. To provide rich RX status information, additional RX PPDU packets are added.

Since there are so many differences mentioned above, we decide to propose a new driver. It has many authors, they are listed in alphabetic order:

Chin-Yen Lee <[email protected]>
Ping-Ke Shih <[email protected]>
Po Hao Huang <[email protected]>
Tzu-En Huang <[email protected]>
Vincent Fann <[email protected]>
Yan-Hsuan Chuang <[email protected]>
Zong-Zhe Yang <[email protected]>

v7:
- use consistent license of Kconfig
- remove #ifdef and dummy functions from coex.c
- C2H handler of coex uses meaningful naming insetad, and use le32_to_cpu() to convert the value.
- add icmp packet notify to coex
- use function call instead of a work to notify coex about traffic changed
- fix dereference security CAM NULL pointer while disconnecting occasionally
- fill tx descriptor once a 32 bits word (Suggested by Arnd. Thanks!)
- use static pci PS, so remove pci link_ps
- make many mac tables constant
- add early_h2c debugfs entry to notify firmware early
- support new RA report format
- configure retry_lowest_rate by band
- avoid to use of whil(1) to parse power sequence
- notify rfk before/after scanning to reset status
- firmware: rtw89: 8852a: update fw to v0.13.30.0

    https://github.com/pkshih/linux-firmware.git
    pick the commit 6595133a7cde82be932067afde834dcd036167f8
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I have not reviewed this version yet, but I pushed it to the pending branch for build testing:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=

Quoted 5 lines
Quoted 5 lines

pending&id=c321740f93af1a31d9e149ce5077e28bd4e859f7

Quoted 4 lines

For the final commit my plan is to squash all patches into one big patch. I will do that after reviewing v7, if everything is ok of course.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Are there more Tested-by or Reviewed-by tags?

Sorry for the late reply. Because our National Day is Oct. 10th, and additional holiday on Oct. 11th.

Aaron have tested v5 and a tag is given [1].

I added Aaron to the commit log and pushed the driver to the master branch:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id
=e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd

Quoted 8 lines
Quoted 4 lines

So the driver is now officially accepted, a big thank you to everyone who participated with the review and testing! Now let's see what kind of reports we get from linux-next.

Thank you!

Should I add myself to the file MAINTAINERS?

Heh, of course I forgot something. Good that you reminded about this :) Yes, please send a separate patch doing that.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches