wifi: rtw89: pci: define PCI ring address for WiFi 7 chips
authorPing-Ke Shih <pkshih@realtek.com>
Thu, 26 Oct 2023 12:00:47 +0000 (20:00 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 30 Oct 2023 17:23:00 +0000 (19:23 +0200)
commit0b79c540b13506b727fcd2b689fec99dc4fc51c6
treed831ecd955737c80f5f4116184723d376720c0e6
parent73b479fe5f4ad5391f69502930c1f782b4c6182f
wifi: rtw89: pci: define PCI ring address for WiFi 7 chips

PCI rings are used to DMA TX/RX packets. The address of WiFi 7 chips are
different from previous ones, so add them according to hardware design.
Another difference is that driver doesn't need to configure BD (buffer
descriptor) RAM table, which is used by hardware to fetch BD ahead before
fetching whole TX data.

A TX ring contains numbers of TX BD (e.g. 512):

   TX BD (buffer descriptor; continual memory)
    +---+---+---+---+     +---+
    |   |   |   |   | ... |   |
    +-|-+---+---+---+     +---+
      |
      | point to TX WD (WiFi descriptor; metadata of a skb data)
      v
    +------+
    |      |
    |      |
    +-|----+
      |
      | point to a skb data
      v
    +------+
    |      |
    |      |
    +------+

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231026120049.9187-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c
drivers/net/wireless/realtek/rtw89/pci.h
drivers/net/wireless/realtek/rtw89/rtw8922ae.c