mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
rtw88: extract: make 8822b an individual kernel module
Make objects about 8822b functions and 8822b tables, i.e. rtw8822b.o and rtw8822b_table.o, an individual kernel module called rtw88_8822b.ko. For 8822b pcie chip, i.e. 8822BE chip, add a chip entry point module called rtw88_8822be.ko which will depend on rtw88_8822b.ko and rtwpci.ko. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200515052327.31874-5-yhchuang@realtek.com
This commit is contained in:
parent
ba0fbe236f
commit
416e87fcc7
@ -16,14 +16,18 @@ config RTW88_CORE
|
||||
config RTW88_PCI
|
||||
tristate
|
||||
|
||||
config RTW88_8822B
|
||||
tristate
|
||||
|
||||
config RTW88_8822C
|
||||
tristate
|
||||
|
||||
config RTW88_8822BE
|
||||
bool "Realtek 8822BE PCI wireless network adapter"
|
||||
tristate "Realtek 8822BE PCI wireless network adapter"
|
||||
depends on PCI
|
||||
select RTW88_CORE
|
||||
select RTW88_PCI
|
||||
select RTW88_8822B
|
||||
help
|
||||
Select this option will enable support for 8822BE chipset
|
||||
|
||||
|
@ -18,9 +18,14 @@ rtw88-y += main.o \
|
||||
wow.o \
|
||||
regd.o
|
||||
|
||||
rtw88-$(CONFIG_RTW88_8822BE) += rtw8822b.o rtw8822b_table.o
|
||||
rtw88-$(CONFIG_RTW88_8723DE) += rtw8723d.o rtw8723d_table.o
|
||||
|
||||
obj-$(CONFIG_RTW88_8822B) += rtw88_8822b.o
|
||||
rtw88_8822b-objs := rtw8822b.o rtw8822b_table.o
|
||||
|
||||
obj-$(CONFIG_RTW88_8822BE) += rtw88_8822be.o
|
||||
rtw88_8822be-objs := rtw8822be.o
|
||||
|
||||
obj-$(CONFIG_RTW88_8822C) += rtw88_8822c.o
|
||||
rtw88_8822c-objs := rtw8822c.o rtw8822c_table.o
|
||||
|
||||
|
@ -40,7 +40,6 @@ extern bool rtw_bf_support;
|
||||
extern unsigned int rtw_fw_lps_deep_mode;
|
||||
extern unsigned int rtw_debug_mask;
|
||||
extern const struct ieee80211_ops rtw_ops;
|
||||
extern struct rtw_chip_info rtw8822b_hw_spec;
|
||||
extern struct rtw_chip_info rtw8723d_hw_spec;
|
||||
|
||||
#define RTW_MAX_CHANNEL_NUM_2G 14
|
||||
|
@ -1594,9 +1594,6 @@ void rtw_pci_shutdown(struct pci_dev *pdev)
|
||||
EXPORT_SYMBOL(rtw_pci_shutdown);
|
||||
|
||||
static const struct pci_device_id rtw_pci_id_table[] = {
|
||||
#ifdef CONFIG_RTW88_8822BE
|
||||
{ RTK_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB822, rtw8822b_hw_spec) },
|
||||
#endif
|
||||
#ifdef CONFIG_RTW88_8723DE
|
||||
{ RTK_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xD723, rtw8723d_hw_spec) },
|
||||
#endif
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* Copyright(c) 2018-2019 Realtek Corporation
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include "main.h"
|
||||
#include "coex.h"
|
||||
#include "fw.h"
|
||||
@ -2506,3 +2507,7 @@ struct rtw_chip_info rtw8822b_hw_spec = {
|
||||
EXPORT_SYMBOL(rtw8822b_hw_spec);
|
||||
|
||||
MODULE_FIRMWARE("rtw88/rtw8822b_fw.bin");
|
||||
|
||||
MODULE_AUTHOR("Realtek Corporation");
|
||||
MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822b driver");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
30
drivers/net/wireless/realtek/rtw88/rtw8822be.c
Normal file
30
drivers/net/wireless/realtek/rtw88/rtw8822be.c
Normal file
@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/* Copyright(c) 2018-2019 Realtek Corporation
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include "rtw8822be.h"
|
||||
|
||||
static const struct pci_device_id rtw_8822be_id_table[] = {
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB822),
|
||||
.driver_data = (kernel_ulong_t)&rtw8822b_hw_spec
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, rtw_8822be_id_table);
|
||||
|
||||
static struct pci_driver rtw_8822be_driver = {
|
||||
.name = "rtw_8822be",
|
||||
.id_table = rtw_8822be_id_table,
|
||||
.probe = rtw_pci_probe,
|
||||
.remove = rtw_pci_remove,
|
||||
.driver.pm = &rtw_pm_ops,
|
||||
.shutdown = rtw_pci_shutdown,
|
||||
};
|
||||
module_pci_driver(rtw_8822be_driver);
|
||||
|
||||
MODULE_AUTHOR("Realtek Corporation");
|
||||
MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822be driver");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
14
drivers/net/wireless/realtek/rtw88/rtw8822be.h
Normal file
14
drivers/net/wireless/realtek/rtw88/rtw8822be.h
Normal file
@ -0,0 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/* Copyright(c) 2018-2019 Realtek Corporation
|
||||
*/
|
||||
|
||||
#ifndef __RTW_8822BE_H_
|
||||
#define __RTW_8822BE_H_
|
||||
|
||||
extern const struct dev_pm_ops rtw_pm_ops;
|
||||
extern struct rtw_chip_info rtw8822b_hw_spec;
|
||||
int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id);
|
||||
void rtw_pci_remove(struct pci_dev *pdev);
|
||||
void rtw_pci_shutdown(struct pci_dev *pdev);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user