Message ID | 45604f31-a992-4188-b8c6-2d8e43981d77@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | wifi: rtw88: Add support for RTL8821AU and RTL8812AU | expand |
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote: > + > +static const struct usb_device_id rtw_8821au_id_table[] = { > + { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x011e, 0xff, 0xff, 0xff), > + .driver_info = (kernel_ulong_t)&(rtw8821a_hw_spec) }, Module description says "8821au/8811au", but only one device ID. Do they share the same ID? > + {}, > +}; > +MODULE_DEVICE_TABLE(usb, rtw_8821au_id_table); > + > +static struct usb_driver rtw_8821au_driver = { > + .name = "rtw_8821au", > + .id_table = rtw_8821au_id_table, > + .probe = rtw_usb_probe, > + .disconnect = rtw_usb_disconnect, > +}; > +module_usb_driver(rtw_8821au_driver); > + > +MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>"); > +MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821au/8811au driver"); > +MODULE_LICENSE("Dual BSD/GPL"); > -- > 2.46.0
On 18/10/2024 10:36, Ping-Ke Shih wrote: > Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote: >> + >> +static const struct usb_device_id rtw_8821au_id_table[] = { >> + { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x011e, 0xff, 0xff, 0xff), >> + .driver_info = (kernel_ulong_t)&(rtw8821a_hw_spec) }, > > Module description says "8821au/8811au", but only one device ID. Do they > share the same ID? > This one and 2604:0012 (RTL8812AU) were the devices I had when I started this work. Then I pushed the code to Larry Finger's github, where Larry and Nick Morrow added many other device IDs. I will send their patches after this series. >> + {}, >> +}; >> +MODULE_DEVICE_TABLE(usb, rtw_8821au_id_table); >> + >> +static struct usb_driver rtw_8821au_driver = { >> + .name = "rtw_8821au", >> + .id_table = rtw_8821au_id_table, >> + .probe = rtw_usb_probe, >> + .disconnect = rtw_usb_disconnect, >> +}; >> +module_usb_driver(rtw_8821au_driver); >> + >> +MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>"); >> +MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821au/8811au driver"); >> +MODULE_LICENSE("Dual BSD/GPL"); >> -- >> 2.46.0 >
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8812au.c b/drivers/net/wireless/realtek/rtw88/rtw8812au.c new file mode 100644 index 000000000000..4da69590a423 --- /dev/null +++ b/drivers/net/wireless/realtek/rtw88/rtw8812au.c @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2024 Realtek Corporation + */ + +#include <linux/module.h> +#include <linux/usb.h> +#include "main.h" +#include "rtw8812a.h" +#include "usb.h" + +static const struct usb_device_id rtw_8812au_id_table[] = { + { USB_DEVICE_AND_INTERFACE_INFO(0x2604, 0x0012, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8812a_hw_spec) }, + {}, +}; +MODULE_DEVICE_TABLE(usb, rtw_8812au_id_table); + +static struct usb_driver rtw_8812au_driver = { + .name = "rtw_8812au", + .id_table = rtw_8812au_id_table, + .probe = rtw_usb_probe, + .disconnect = rtw_usb_disconnect, +}; +module_usb_driver(rtw_8812au_driver); + +MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>"); +MODULE_DESCRIPTION("Realtek 802.11ac wireless 8812au driver"); +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821au.c b/drivers/net/wireless/realtek/rtw88/rtw8821au.c new file mode 100644 index 000000000000..730018773e1c --- /dev/null +++ b/drivers/net/wireless/realtek/rtw88/rtw8821au.c @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2024 Realtek Corporation + */ + +#include <linux/module.h> +#include <linux/usb.h> +#include "main.h" +#include "rtw8821a.h" +#include "usb.h" + +static const struct usb_device_id rtw_8821au_id_table[] = { + { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x011e, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8821a_hw_spec) }, + {}, +}; +MODULE_DEVICE_TABLE(usb, rtw_8821au_id_table); + +static struct usb_driver rtw_8821au_driver = { + .name = "rtw_8821au", + .id_table = rtw_8821au_id_table, + .probe = rtw_usb_probe, + .disconnect = rtw_usb_disconnect, +}; +module_usb_driver(rtw_8821au_driver); + +MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>"); +MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821au/8811au driver"); +MODULE_LICENSE("Dual BSD/GPL");
These are the entry points for the new modules rtw88_8821au (RTL8821AU/RTL8811AU) and rtw88_8812au (RTL8812AU). Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> --- v2: - Fix copyright year. - Include the correct header rtw8812a.h in rtw8812au.c. --- .../net/wireless/realtek/rtw88/rtw8812au.c | 28 +++++++++++++++++++ .../net/wireless/realtek/rtw88/rtw8821au.c | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8812au.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821au.c