xref: /freebsd/sys/contrib/dev/rtw88/rtw8821cu.c (revision 11c53278a8a3e86e14377f09bbaa7bad193d3713)
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, 0x2006, 0xff, 0xff, 0xff),
13 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
14 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8731, 0xff, 0xff, 0xff),
15 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
16 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8811, 0xff, 0xff, 0xff),
17 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
18 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb820, 0xff, 0xff, 0xff),
19 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
20 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82b, 0xff, 0xff, 0xff),
21 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
22 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc80c, 0xff, 0xff, 0xff),
23 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
24 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc811, 0xff, 0xff, 0xff),
25 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
26 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc820, 0xff, 0xff, 0xff),
27 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
28 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc821, 0xff, 0xff, 0xff),
29 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
30 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82a, 0xff, 0xff, 0xff),
31 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
32 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82b, 0xff, 0xff, 0xff),
33 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
34 	{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82c, 0xff, 0xff, 0xff),
35 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
36 	{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331d, 0xff, 0xff, 0xff),
37 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* D-Link */
38 	{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xc811, 0xff, 0xff, 0xff),
39 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */
40 	{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd811, 0xff, 0xff, 0xff),
41 	  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */
42 	{},
43 };
44 MODULE_DEVICE_TABLE(usb, rtw_8821cu_id_table);
45 
46 static int rtw_8821cu_probe(struct usb_interface *intf,
47 			    const struct usb_device_id *id)
48 {
49 	return rtw_usb_probe(intf, id);
50 }
51 
52 static struct usb_driver rtw_8821cu_driver = {
53 	.name = "rtw_8821cu",
54 	.id_table = rtw_8821cu_id_table,
55 	.probe = rtw_8821cu_probe,
56 	.disconnect = rtw_usb_disconnect,
57 #if defined(__FreeBSD__) && defined(__notyet__)
58 	.bsddriver.name = KBUILD_MODNAME,
59 #endif
60 };
61 module_usb_driver(rtw_8821cu_driver);
62 
63 MODULE_AUTHOR("Hans Ulli Kroll <linux@ulli-kroll.de>");
64 MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821cu driver");
65 MODULE_LICENSE("Dual BSD/GPL");
66