diff options
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/dm9601.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/rndis_host.c | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index a2de32fabc1..2c685734b7a 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -586,6 +586,10 @@ static const struct usb_device_id products[] = { USB_DEVICE(0x0a46, 0x0268), /* ShanTou ST268 USB NIC */ .driver_info = (unsigned long)&dm9601_info, }, + { + USB_DEVICE(0x0a46, 0x8515), /* ADMtek ADM8515 USB NIC */ + .driver_info = (unsigned long)&dm9601_info, + }, {}, // END }; diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index cd991a0f75b..1ebe3259be0 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c @@ -512,11 +512,19 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf) } tmp = le32_to_cpu(u.init_c->max_transfer_size); if (tmp < dev->hard_mtu) { - dev_err(&intf->dev, - "dev can't take %u byte packets (max %u)\n", - dev->hard_mtu, tmp); - retval = -EINVAL; - goto fail_and_release; + if (tmp <= net->hard_header_len) { + dev_err(&intf->dev, + "dev can't take %u byte packets (max %u)\n", + dev->hard_mtu, tmp); + retval = -EINVAL; + goto fail_and_release; + } + dev->hard_mtu = tmp; + net->mtu = dev->hard_mtu - net->hard_header_len; + dev_warn(&intf->dev, + "dev can't take %u byte packets (max %u), " + "adjusting MTU to %u\n", + dev->hard_mtu, tmp, net->mtu); } /* REVISIT: peripheral "alignment" request is ignored ... */ |