xref: /freebsd/sys/contrib/dev/rtw88/rtw8821cu.c (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2 /* Copyright(c) 2018-2019  Realtek Corporation
3  */
4 
5 #include <linux/module.h>
6 #include <linux/usb.h>
7 #include "main.h"
8 #include "rtw8821c.h"
9 #include "usb.h"
10 
11 static const struct usb_device_id rtw_8821cu_id_table[] = {
12 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82b, 0xff, 0xff, 0xff),
13 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
14 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb820, 0xff, 0xff, 0xff),
15 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
16 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc821, 0xff, 0xff, 0xff),
17 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
18 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc820, 0xff, 0xff, 0xff),
19 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
20 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82a, 0xff, 0xff, 0xff),
21 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
22 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82b, 0xff, 0xff, 0xff),
23 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */
24 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc811, 0xff, 0xff, 0xff),
25 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8811CU */
26 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8811, 0xff, 0xff, 0xff),
27 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8811CU */
28 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x2006, 0xff, 0xff, 0xff),
29 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* TOTOLINK A650UA v3 */
30 	{},
31 };
32 MODULE_DEVICE_TABLE(usb, rtw_8821cu_id_table);
33 
34 static int rtw_8821cu_probe(struct usb_interface *intf,
35 			    const struct usb_device_id *id)
36 {
37 	return rtw_usb_probe(intf, id);
38 }
39 
40 static struct usb_driver rtw_8821cu_driver = {
41 	.name = "rtw_8821cu",
42 	.id_table = rtw_8821cu_id_table,
43 	.probe = rtw_8821cu_probe,
44 	.disconnect = rtw_usb_disconnect,
45 #if defined(__FreeBSD__) && defined(__notyet__)
46 	.bsddriver.name = KBUILD_MODNAME,
47 #endif
48 };
49 module_usb_driver(rtw_8821cu_driver);
50 
51 MODULE_AUTHOR("Hans Ulli Kroll <linux@ulli-kroll.de>");
52 MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821cu driver");
53 MODULE_LICENSE("Dual BSD/GPL");
54