1*45794099SSascha Hauer // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2*45794099SSascha Hauer /* Copyright(c) 2018-2019 Realtek Corporation
3*45794099SSascha Hauer */
4*45794099SSascha Hauer
5*45794099SSascha Hauer #include <linux/module.h>
6*45794099SSascha Hauer #include <linux/usb.h>
7*45794099SSascha Hauer #include "main.h"
8*45794099SSascha Hauer #include "rtw8822b.h"
9*45794099SSascha Hauer #include "usb.h"
10*45794099SSascha Hauer
11*45794099SSascha Hauer static const struct usb_device_id rtw_8822bu_id_table[] = {
12*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb812, 0xff, 0xff, 0xff),
13*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
14*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82c, 0xff, 0xff, 0xff),
15*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
16*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x2102, 0xff, 0xff, 0xff),
17*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* CCNC */
18*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xb822, 0xff, 0xff, 0xff),
19*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822ULC */
20*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xc822, 0xff, 0xff, 0xff),
21*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822UTC */
22*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd822, 0xff, 0xff, 0xff),
23*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax */
24*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xe822, 0xff, 0xff, 0xff),
25*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax */
26*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xf822, 0xff, 0xff, 0xff),
27*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822UAD */
28*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb81a, 0xff, 0xff, 0xff),
29*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Default ID */
30*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1841, 0xff, 0xff, 0xff),
31*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS AC1300 USB-AC55 B1 */
32*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x184c, 0xff, 0xff, 0xff),
33*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS U2 */
34*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x19aa, 0xff, 0xff, 0xff),
35*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS - USB-AC58 rev A1 */
36*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x1870, 0xff, 0xff, 0xff),
37*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS */
38*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x1874, 0xff, 0xff, 0xff),
39*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS */
40*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331e, 0xff, 0xff, 0xff),
41*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Dlink - DWA-181 */
42*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331c, 0xff, 0xff, 0xff),
43*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Dlink - DWA-182 - D1 */
44*45794099SSascha Hauer {USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331f, 0xff, 0xff, 0xff),
45*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec)}, /* Dlink - DWA-183 D Ver */
46*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff),
47*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Linksys WUSB6400M */
48*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0045, 0xff, 0xff, 0xff),
49*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Linksys WUSB3600 v2 */
50*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012d, 0xff, 0xff, 0xff),
51*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T3U v1 */
52*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0138, 0xff, 0xff, 0xff),
53*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T3U Plus v1 */
54*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0115, 0xff, 0xff, 0xff),
55*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T4U V3 */
56*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012e, 0xff, 0xff, 0xff),
57*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */
58*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0116, 0xff, 0xff, 0xff),
59*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */
60*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0117, 0xff, 0xff, 0xff),
61*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */
62*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0846, 0x9055, 0xff, 0xff, 0xff),
63*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Netgear A6150 */
64*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x0e66, 0x0025, 0xff, 0xff, 0xff),
65*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Hawking HW12ACU */
66*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x04ca, 0x8602, 0xff, 0xff, 0xff),
67*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* LiteOn */
68*45794099SSascha Hauer { USB_DEVICE_AND_INTERFACE_INFO(0x20f4, 0x808a, 0xff, 0xff, 0xff),
69*45794099SSascha Hauer .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TRENDnet TEW-808UBM */
70*45794099SSascha Hauer {},
71*45794099SSascha Hauer };
72*45794099SSascha Hauer MODULE_DEVICE_TABLE(usb, rtw_8822bu_id_table);
73*45794099SSascha Hauer
rtw8822bu_probe(struct usb_interface * intf,const struct usb_device_id * id)74*45794099SSascha Hauer static int rtw8822bu_probe(struct usb_interface *intf,
75*45794099SSascha Hauer const struct usb_device_id *id)
76*45794099SSascha Hauer {
77*45794099SSascha Hauer return rtw_usb_probe(intf, id);
78*45794099SSascha Hauer }
79*45794099SSascha Hauer
80*45794099SSascha Hauer static struct usb_driver rtw_8822bu_driver = {
81*45794099SSascha Hauer .name = "rtw_8822bu",
82*45794099SSascha Hauer .id_table = rtw_8822bu_id_table,
83*45794099SSascha Hauer .probe = rtw8822bu_probe,
84*45794099SSascha Hauer .disconnect = rtw_usb_disconnect,
85*45794099SSascha Hauer };
86*45794099SSascha Hauer module_usb_driver(rtw_8822bu_driver);
87*45794099SSascha Hauer
88*45794099SSascha Hauer MODULE_AUTHOR("Realtek Corporation");
89*45794099SSascha Hauer MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822bu driver");
90*45794099SSascha Hauer MODULE_LICENSE("Dual BSD/GPL");
91