Skip to content

Commit 7a635ea

Browse files
balrog-kundavem330
authored andcommitted
net/usb: Ethernet quirks for the LG-VL600 4G modem
This adds a driver for the CDC Ethernet part of this modem. The device's ID is blacklisted in cdc_ether.c and is white-listed in this new driver because of the quirks needed to make it useful. The modem's firmware exposes a CDC ACM port for modem control and a CDC Ethernet port for network data. The descriptors look fine but both ports actually are some sort of multiplexers requiring non- standard headers added/removed from every packet or they get ignored. All information is based on a usb traffic log from a Windows machine. On the Verizon 4G network I've seen speeds up to 1.1MB/s so far with this driver, a speed-o-meter site reports 16.2Mbps/10.5Mbps. Userspace scripts are required to talk to the CDC ACM port. Signed-off-by: Andrzej Zaborowski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d005a09 commit 7a635ea

File tree

6 files changed

+387
-9
lines changed

6 files changed

+387
-9
lines changed

drivers/net/usb/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,4 +433,19 @@ config USB_SIERRA_NET
433433
To compile this driver as a module, choose M here: the
434434
module will be called sierra_net.
435435

436+
config USB_VL600
437+
tristate "LG VL600 modem dongle"
438+
depends on USB_NET_CDCETHER
439+
select USB_ACM
440+
help
441+
Select this if you want to use an LG Electronics 4G/LTE usb modem
442+
called VL600. This driver only handles the ethernet
443+
interface exposed by the modem firmware. To establish a connection
444+
you will first need a userspace program that sends the right
445+
command to the modem through its CDC ACM port, and most
446+
likely also a DHCP client. See this thread about using the
447+
4G modem from Verizon:
448+
449+
http://ubuntuforums.org/showpost.php?p=10589647&postcount=17
450+
436451
endmenu

drivers/net/usb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ obj-$(CONFIG_USB_IPHETH) += ipheth.o
2727
obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o
2828
obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
2929
obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o
30+
obj-$(CONFIG_USB_VL600) += lg-vl600.o
3031

drivers/net/usb/cdc_ether.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static void dumpspeed(struct usbnet *dev, __le32 *speeds)
378378
__le32_to_cpu(speeds[1]) / 1000);
379379
}
380380

381-
static void cdc_status(struct usbnet *dev, struct urb *urb)
381+
void usbnet_cdc_status(struct usbnet *dev, struct urb *urb)
382382
{
383383
struct usb_cdc_notification *event;
384384

@@ -418,8 +418,9 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
418418
break;
419419
}
420420
}
421+
EXPORT_SYMBOL_GPL(usbnet_cdc_status);
421422

422-
static int cdc_bind(struct usbnet *dev, struct usb_interface *intf)
423+
int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
423424
{
424425
int status;
425426
struct cdc_state *info = (void *) &dev->data;
@@ -441,6 +442,7 @@ static int cdc_bind(struct usbnet *dev, struct usb_interface *intf)
441442
*/
442443
return 0;
443444
}
445+
EXPORT_SYMBOL_GPL(usbnet_cdc_bind);
444446

445447
static int cdc_manage_power(struct usbnet *dev, int on)
446448
{
@@ -452,18 +454,18 @@ static const struct driver_info cdc_info = {
452454
.description = "CDC Ethernet Device",
453455
.flags = FLAG_ETHER,
454456
// .check_connect = cdc_check_connect,
455-
.bind = cdc_bind,
457+
.bind = usbnet_cdc_bind,
456458
.unbind = usbnet_cdc_unbind,
457-
.status = cdc_status,
459+
.status = usbnet_cdc_status,
458460
.manage_power = cdc_manage_power,
459461
};
460462

461463
static const struct driver_info mbm_info = {
462464
.description = "Mobile Broadband Network Device",
463465
.flags = FLAG_WWAN,
464-
.bind = cdc_bind,
466+
.bind = usbnet_cdc_bind,
465467
.unbind = usbnet_cdc_unbind,
466-
.status = cdc_status,
468+
.status = usbnet_cdc_status,
467469
.manage_power = cdc_manage_power,
468470
};
469471

@@ -560,6 +562,13 @@ static const struct usb_device_id products [] = {
560562
.driver_info = 0,
561563
},
562564

565+
/* LG Electronics VL600 wants additional headers on every frame */
566+
{
567+
USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
568+
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
569+
.driver_info = 0,
570+
},
571+
563572
/*
564573
* WHITELIST!!!
565574
*

0 commit comments

Comments
 (0)