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 <balrogg@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d005a09edf
commit
7a635ea989
@@ -378,7 +378,7 @@ static void dumpspeed(struct usbnet *dev, __le32 *speeds)
|
||||
__le32_to_cpu(speeds[1]) / 1000);
|
||||
}
|
||||
|
||||
static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
void usbnet_cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
{
|
||||
struct usb_cdc_notification *event;
|
||||
|
||||
@@ -418,8 +418,9 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usbnet_cdc_status);
|
||||
|
||||
static int cdc_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
{
|
||||
int status;
|
||||
struct cdc_state *info = (void *) &dev->data;
|
||||
@@ -441,6 +442,7 @@ static int cdc_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usbnet_cdc_bind);
|
||||
|
||||
static int cdc_manage_power(struct usbnet *dev, int on)
|
||||
{
|
||||
@@ -452,18 +454,18 @@ static const struct driver_info cdc_info = {
|
||||
.description = "CDC Ethernet Device",
|
||||
.flags = FLAG_ETHER,
|
||||
// .check_connect = cdc_check_connect,
|
||||
.bind = cdc_bind,
|
||||
.bind = usbnet_cdc_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = cdc_status,
|
||||
.status = usbnet_cdc_status,
|
||||
.manage_power = cdc_manage_power,
|
||||
};
|
||||
|
||||
static const struct driver_info mbm_info = {
|
||||
.description = "Mobile Broadband Network Device",
|
||||
.flags = FLAG_WWAN,
|
||||
.bind = cdc_bind,
|
||||
.bind = usbnet_cdc_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = cdc_status,
|
||||
.status = usbnet_cdc_status,
|
||||
.manage_power = cdc_manage_power,
|
||||
};
|
||||
|
||||
@@ -560,6 +562,13 @@ static const struct usb_device_id products [] = {
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* LG Electronics VL600 wants additional headers on every frame */
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/*
|
||||
* WHITELIST!!!
|
||||
*
|
||||
|
Reference in New Issue
Block a user