aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 18:19:59 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 18:19:59 -0400
commit2304c3ac3634d2de59f71f7b2c58aab05959124b (patch)
tree88e13187b64f8bfdea841c4a4476ac626e4eec28 /drivers/net/usb
parentfcd05809e1b2f64ece7a0b0bbe94ed29505cd2e0 (diff)
parent96fd4cd3e40e240f0c385af87f58e74da8b7099a (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: [netdrvr] forcedeth: add MCP77 device IDs rndis_host: reduce MTU instead of refusing to talk to devices with low max packet size cpmac: update to new fixed phy driver interface cpmac: convert to napi_struct interface cpmac: use print_mac() instead of MAC_FMT natsemi: fix oops, link back netdevice from private-struct ehea: fix port_napi_disable/enable bonding/bond_main.c: fix cut'n'paste error make bonding/bond_main.c:bond_deinit() static drivers/net/ipg.c: cleanups remove Documentation/networking/net-modules.txt
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/rndis_host.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index cd991a0f75bb..1ebe3259be0d 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)
512 } 512 }
513 tmp = le32_to_cpu(u.init_c->max_transfer_size); 513 tmp = le32_to_cpu(u.init_c->max_transfer_size);
514 if (tmp < dev->hard_mtu) { 514 if (tmp < dev->hard_mtu) {
515 dev_err(&intf->dev, 515 if (tmp <= net->hard_header_len) {
516 "dev can't take %u byte packets (max %u)\n", 516 dev_err(&intf->dev,
517 dev->hard_mtu, tmp); 517 "dev can't take %u byte packets (max %u)\n",
518 retval = -EINVAL; 518 dev->hard_mtu, tmp);
519 goto fail_and_release; 519 retval = -EINVAL;
520 goto fail_and_release;
521 }
522 dev->hard_mtu = tmp;
523 net->mtu = dev->hard_mtu - net->hard_header_len;
524 dev_warn(&intf->dev,
525 "dev can't take %u byte packets (max %u), "
526 "adjusting MTU to %u\n",
527 dev->hard_mtu, tmp, net->mtu);
520 } 528 }
521 529
522 /* REVISIT: peripheral "alignment" request is ignored ... */ 530 /* REVISIT: peripheral "alignment" request is ignored ... */