]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: rtw89: pci: add group BD address design
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 26 Aug 2025 08:53:18 +0000 (16:53 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 1 Sep 2025 02:53:51 +0000 (10:53 +0800)
commit2d7514829950d6e4ab2fe7b855f21546b3420450
treed8361dc7c4b0a643de6d729465abb2ec875a8dc7
parenta86a0fea192cf735c1693cef566d5bb8dc2b49fc
wifi: rtw89: pci: add group BD address design

The newly designed group BD address is to use the same starting DMA address
with offset as below picture:

 Original            DMA memory         Group BD address

 +--------+  (*1)   +---------+   (*2)  +--------+
 |  CH 0 -|-------> |         | <-------|- CH 0  | <-+--+--+--+
 +--------+         |         |         |        |   |  |  |  |
 |  CH 1 -|-------> |         |         |  CH 1 -|---+  |  |  |
 +--------+         |         |         |        |      |  |  |
 |  CH 2 -|-------> |         |         |  CH 2 -|------+  |  |
 +--------+         |         |         |        |         |  |
 |  CH 3 -|-------> |         |         |  CH 3 -|---------+  |
 +--------+         |         |         |        |            |
 |    :  -|-------> |         |         |    :  -|------------+
 +--------+         |         |         +--------+   (*3; offset from CH 0)
 |  CH 8 -|-------> |         | <-------|- CH 8  | <-+
 +--------+         |         |         |        |   | (offset from CH 8)
 |    :  -|-------> |         |         |    :  -|---+
 +--------+         +---------+         +--------+

Compare (*1) and (*2), for original design, each DMA channel has
individual DMA address, so it is not necessary to allocate continual
DMA address across channels. For group BD address, only two DMA address
are set, and each channel set the offset (*3) from base address.

The element number and offset of a channel are encoded rather than a
raw number, so add a function to translate numbers into hardware format.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250826085318.28361-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c
drivers/net/wireless/realtek/rtw89/pci.h
drivers/net/wireless/realtek/rtw89/rtw8851be.c
drivers/net/wireless/realtek/rtw89/rtw8852ae.c
drivers/net/wireless/realtek/rtw89/rtw8852be.c
drivers/net/wireless/realtek/rtw89/rtw8852bte.c
drivers/net/wireless/realtek/rtw89/rtw8852ce.c
drivers/net/wireless/realtek/rtw89/rtw8922ae.c