linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] wifi: rtw89: pci: add PCI generation struct to reuse common flow
@ 2023-11-01  7:21 Ping-Ke Shih
  2023-11-01  7:21 ` [PATCH 1/5] wifi: rtw89: pci: add PCI generation information to pci_info for each chip Ping-Ke Shih
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ping-Ke Shih @ 2023-11-01  7:21 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

For WiFi 7 chips, the PCI settings are similar, but registers' names are
changed, so it will be difficult to understand the code if we mix the code
of two generations into one function. Therefore, we add a struct to
abstract PCI generation info, and put the code used by WiFi 7 chips
in pci_be.c.

Then, the struct hierarchy looks like

 rtwdev
   |
   v
 const struct rtw89_pci_info *pci_info;   // per chip (e.g. 8922ae.c)
   |
   v
 const struct rtw89_pci_gen_def *gen_def; // per generation (e.g. pci_be.c)

Ping-Ke Shih (5):
  wifi: rtw89: pci: add PCI generation information to pci_info for each
    chip
  wifi: rtw89: pci: use gen_def pointer to configure mac_{pre,post}_init
    and clear PCI ring index
  wifi: rtw89: pci: implement PCI mac_pre_init for WiFi 7 chips
  wifi: rtw89: pci: add LTR v2 for WiFi 7 chip
  wifi: rtw89: pci: implement PCI mac_post_init for WiFi 7 chips

 drivers/net/wireless/realtek/rtw89/pci.c      |  16 +-
 drivers/net/wireless/realtek/rtw89/pci.h      | 150 ++++++
 drivers/net/wireless/realtek/rtw89/pci_be.c   | 429 ++++++++++++++++++
 drivers/net/wireless/realtek/rtw89/reg.h      | 271 +++++++++++
 .../net/wireless/realtek/rtw89/rtw8851be.c    |   1 +
 .../net/wireless/realtek/rtw89/rtw8852ae.c    |   1 +
 .../net/wireless/realtek/rtw89/rtw8852be.c    |   1 +
 .../net/wireless/realtek/rtw89/rtw8852ce.c    |   1 +
 .../net/wireless/realtek/rtw89/rtw8922ae.c    |   2 +
 9 files changed, 868 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw89/pci_be.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-08 18:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01  7:21 [PATCH 0/5] wifi: rtw89: pci: add PCI generation struct to reuse common flow Ping-Ke Shih
2023-11-01  7:21 ` [PATCH 1/5] wifi: rtw89: pci: add PCI generation information to pci_info for each chip Ping-Ke Shih
2023-11-08 18:10   ` Kalle Valo
2023-11-01  7:21 ` [PATCH 2/5] wifi: rtw89: pci: use gen_def pointer to configure mac_{pre,post}_init and clear PCI ring index Ping-Ke Shih
2023-11-01  7:21 ` [PATCH 3/5] wifi: rtw89: pci: implement PCI mac_pre_init for WiFi 7 chips Ping-Ke Shih
2023-11-01  7:21 ` [PATCH 4/5] wifi: rtw89: pci: add LTR v2 for WiFi 7 chip Ping-Ke Shih
2023-11-01  7:21 ` [PATCH 5/5] wifi: rtw89: pci: implement PCI mac_post_init for WiFi 7 chips Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).