-
Notifications
You must be signed in to change notification settings - Fork 15
/
rtw8822bu.c
72 lines (63 loc) · 2.54 KB
/
rtw8822bu.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/* Copyright(c) 2018-2019 Realtek Corporation
*/
#include <linux/module.h>
#include <linux/usb.h>
#include "main.h"
#include "rtw8822bu.h"
#define RTW_USB_VENDER_ID_EDIMAX 0x7392
static const struct usb_device_id rtw_8822bu_id_table[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK,
RTW_USB_PRODUCT_ID_REALTEK_8812B,
0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK,
RTW_USB_PRODUCT_ID_REALTEK_8822B,
0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDER_ID_EDIMAX,
0xB822,
0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDER_ID_EDIMAX,
0xC822,
0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x0b05, 0x184c), /* ASUS AC53 Nano */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x0b05, 0x1841), /* ASUS AC55 B1 */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x2001, 0x331c), /* D-Link DWA-182 rev D1 */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x13b1, 0x0043), /* Linksys WUSB6400M */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x2357, 0x012D), /* TP-Link AC1300 T3U */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{ USB_DEVICE(0x2357, 0x0138), /* TP-Link AC1300 T3U */
.driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },
{},
};
MODULE_DEVICE_TABLE(usb, rtw_8822bu_id_table);
static struct rtw_module_param rtw8822bu_mod_params = {
.disable_idle = true,
.disable_ps = true,
};
module_param_named(disable_idle, rtw8822bu_mod_params.disable_idle, bool, 0444);
module_param_named(disable_ps, rtw8822bu_mod_params.disable_ps, bool, 0644);
MODULE_PARM_DESC(disable_idle, "mac80211 power save: (default 1)");
MODULE_PARM_DESC(disable_ps, "mac80211 idle: (default 1)");
static int rtw8822bu_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
return rtw_usb_probe(intf, id, &rtw8822bu_mod_params);
}
static struct usb_driver rtw_8822bu_driver = {
.name = "rtw_8822bu",
.id_table = rtw_8822bu_id_table,
.probe = rtw8822bu_probe,
.disconnect = rtw_usb_disconnect,
};
module_usb_driver(rtw_8822bu_driver);
MODULE_AUTHOR("Realtek Corporation");
MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822bu driver");
MODULE_LICENSE("Dual BSD/GPL");