diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2022-03-07 09:04:46 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-03-10 19:42:06 +0300 |
commit | 4a9e48accf2d459370abf05cb1a945895b5b9719 (patch) | |
tree | d91fc95cb1463e1e288b9b9a0d33f8046a4b286a /drivers/net | |
parent | 0ac80e05ea329acdb3bf2c9cc37b102b58390759 (diff) | |
download | linux-4a9e48accf2d459370abf05cb1a945895b5b9719.tar.xz |
rtw89: pci: add struct rtw89_pci_info
Use this struct to implement chip::ops related to PCI interface.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220307060457.56789-3-pkshih@realtek.com
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/core.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/pci.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/rtw8852ae.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/rtw8852ce.c | 6 |
5 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index d203e4c5727d..8b36972744f8 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -13,6 +13,7 @@ #include <net/mac80211.h> struct rtw89_dev; +struct rtw89_pci_info; extern const struct ieee80211_ops rtw89_ops; @@ -2306,8 +2307,13 @@ struct rtw89_chip_info { u8 ps_mode_supported; }; +union rtw89_bus_info { + const struct rtw89_pci_info *pci; +}; + struct rtw89_driver_info { const struct rtw89_chip_info *chip; + union rtw89_bus_info bus; }; enum rtw89_hcifc_mode { @@ -2858,6 +2864,7 @@ struct rtw89_dev { bool dbcc_en; struct rtw89_hw_scan_info scan_info; const struct rtw89_chip_info *chip; + const struct rtw89_pci_info *pci_info; struct rtw89_hal hal; struct rtw89_mac_info mac; struct rtw89_fw_info fw; diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c index 6481085b958e..9f2a23e79e5d 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.c +++ b/drivers/net/wireless/realtek/rtw89/pci.c @@ -2937,6 +2937,7 @@ int rtw89_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) info = (const struct rtw89_driver_info *)id->driver_data; rtwdev->chip = info->chip; + rtwdev->pci_info = info->bus.pci; ret = rtw89_core_init(rtwdev); if (ret) { diff --git a/drivers/net/wireless/realtek/rtw89/pci.h b/drivers/net/wireless/realtek/rtw89/pci.h index 7f1ee1544688..2b8bbfa77d1b 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.h +++ b/drivers/net/wireless/realtek/rtw89/pci.h @@ -382,6 +382,9 @@ enum rtw89_pcie_clkdly_hw { PCIE_CLKDLY_HW_200US = 0x5, }; +struct rtw89_pci_info { +}; + struct rtw89_pci_bd_ram { u8 start_idx; u8 max_num; diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852ae.c b/drivers/net/wireless/realtek/rtw89/rtw8852ae.c index de93280e0f69..527c0bba0aa6 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852ae.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852ae.c @@ -8,8 +8,14 @@ #include "pci.h" #include "rtw8852a.h" +static const struct rtw89_pci_info rtw8852a_pci_info = { +}; + static const struct rtw89_driver_info rtw89_8852ae_info = { .chip = &rtw8852a_chip_info, + .bus = { + .pci = &rtw8852a_pci_info, + }, }; static const struct pci_device_id rtw89_8852ae_id_table[] = { diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852ce.c b/drivers/net/wireless/realtek/rtw89/rtw8852ce.c index ee700bba1eb1..f3ce71c822bc 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852ce.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852ce.c @@ -9,8 +9,14 @@ #include "reg.h" #include "rtw8852c.h" +static const struct rtw89_pci_info rtw8852c_pci_info = { +}; + static const struct rtw89_driver_info rtw89_8852ce_info = { .chip = &rtw8852c_chip_info, + .bus = { + .pci = &rtw8852c_pci_info, + }, }; static const struct pci_device_id rtw89_8852ce_id_table[] = { |