1aff5ffd7SSascha Hauer // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2aff5ffd7SSascha Hauer /* Copyright(c) 2018-2019 Realtek Corporation
3aff5ffd7SSascha Hauer */
4aff5ffd7SSascha Hauer
5aff5ffd7SSascha Hauer #include <linux/module.h>
6aff5ffd7SSascha Hauer #include <linux/usb.h>
7aff5ffd7SSascha Hauer #include "main.h"
8aff5ffd7SSascha Hauer #include "rtw8821c.h"
9aff5ffd7SSascha Hauer #include "usb.h"
10aff5ffd7SSascha Hauer
11aff5ffd7SSascha Hauer static const struct usb_device_id rtw_8821cu_id_table[] = {
12aff5ffd7SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x2006, 0xff, 0xff, 0xff),
13*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
14*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8731, 0xff, 0xff, 0xff),
15*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
16*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8811, 0xff, 0xff, 0xff),
17*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
18*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb820, 0xff, 0xff, 0xff),
19*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
20*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82b, 0xff, 0xff, 0xff),
21*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
22*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc80c, 0xff, 0xff, 0xff),
23*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
24*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc811, 0xff, 0xff, 0xff),
25*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
26*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc820, 0xff, 0xff, 0xff),
27*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
28*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc821, 0xff, 0xff, 0xff),
29*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
30*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82a, 0xff, 0xff, 0xff),
31*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
32*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82b, 0xff, 0xff, 0xff),
33*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) },
34*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331d, 0xff, 0xff, 0xff),
35*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* D-Link */
36*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xc811, 0xff, 0xff, 0xff),
37*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */
38*0bfe6b29SNick Morrow { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd811, 0xff, 0xff, 0xff),
39*0bfe6b29SNick Morrow .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */
40aff5ffd7SSascha Hauer {},
41aff5ffd7SSascha Hauer };
42aff5ffd7SSascha Hauer MODULE_DEVICE_TABLE(usb, rtw_8821cu_id_table);
43aff5ffd7SSascha Hauer
rtw_8821cu_probe(struct usb_interface * intf,const struct usb_device_id * id)44aff5ffd7SSascha Hauer static int rtw_8821cu_probe(struct usb_interface *intf,
45aff5ffd7SSascha Hauer const struct usb_device_id *id)
46aff5ffd7SSascha Hauer {
47aff5ffd7SSascha Hauer return rtw_usb_probe(intf, id);
48aff5ffd7SSascha Hauer }
49aff5ffd7SSascha Hauer
50aff5ffd7SSascha Hauer static struct usb_driver rtw_8821cu_driver = {
51aff5ffd7SSascha Hauer .name = "rtw_8821cu",
52aff5ffd7SSascha Hauer .id_table = rtw_8821cu_id_table,
53aff5ffd7SSascha Hauer .probe = rtw_8821cu_probe,
54aff5ffd7SSascha Hauer .disconnect = rtw_usb_disconnect,
55aff5ffd7SSascha Hauer };
56aff5ffd7SSascha Hauer module_usb_driver(rtw_8821cu_driver);
57aff5ffd7SSascha Hauer
58aff5ffd7SSascha Hauer MODULE_AUTHOR("Hans Ulli Kroll <linux@ulli-kroll.de>");
59aff5ffd7SSascha Hauer MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821cu driver");
60aff5ffd7SSascha Hauer MODULE_LICENSE("Dual BSD/GPL");
61