Skip to content

Commit ac718b6

Browse files
hayesorzdavem330
authored andcommitted
net/usb: new driver for RTL8152
Add new driver for supporting Realtek RTL8152 Based USB 2.0 Ethernet Adapters Signed-off-by: Hayes Wang <[email protected]> Cc: Realtek linux nic maintainers <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c81400b commit ac718b6

File tree

4 files changed

+1789
-0
lines changed

4 files changed

+1789
-0
lines changed

drivers/net/usb/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ config USB_RTL8150
9393
To compile this driver as a module, choose M here: the
9494
module will be called rtl8150.
9595

96+
config USB_RTL8152
97+
tristate "Realtek RTL8152 Based USB 2.0 Ethernet Adapters"
98+
select NET_CORE
99+
select MII
100+
help
101+
This option adds support for Realtek RTL8152 based USB 2.0
102+
10/100 Ethernet adapters.
103+
104+
To compile this driver as a module, choose M here: the
105+
module will be called r8152.
106+
96107
config USB_USBNET
97108
tristate "Multi-purpose USB Networking Framework"
98109
select NET_CORE

drivers/net/usb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ obj-$(CONFIG_USB_CATC) += catc.o
66
obj-$(CONFIG_USB_KAWETH) += kaweth.o
77
obj-$(CONFIG_USB_PEGASUS) += pegasus.o
88
obj-$(CONFIG_USB_RTL8150) += rtl8150.o
9+
obj-$(CONFIG_USB_RTL8152) += r8152.o
910
obj-$(CONFIG_USB_HSO) += hso.o
1011
obj-$(CONFIG_USB_NET_AX8817X) += asix.o
1112
asix-y := asix_devices.o asix_common.o ax88172a.o

drivers/net/usb/cdc_ether.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ static const struct driver_info wwan_info = {
479479
#define NOVATEL_VENDOR_ID 0x1410
480480
#define ZTE_VENDOR_ID 0x19D2
481481
#define DELL_VENDOR_ID 0x413C
482+
#define REALTEK_VENDOR_ID 0x0bda
482483

483484
static const struct usb_device_id products [] = {
484485
/*
@@ -619,6 +620,15 @@ static const struct usb_device_id products [] = {
619620
.driver_info = 0,
620621
},
621622

623+
/* Realtek RTL8152 Based USB 2.0 Ethernet Adapters */
624+
#if defined(CONFIG_USB_RTL8152) || defined(CONFIG_USB_RTL8152_MODULE)
625+
{
626+
USB_DEVICE_AND_INTERFACE_INFO(REALTEK_VENDOR_ID, 0x8152, USB_CLASS_COMM,
627+
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
628+
.driver_info = 0,
629+
},
630+
#endif
631+
622632
/*
623633
* WHITELIST!!!
624634
*

0 commit comments

Comments
 (0)