]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: usbnet, zaurus mtu fixup
authorDavid Brownell <david-b@pacbell.net>
Sat, 13 May 2006 02:24:34 +0000 (19:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Jun 2006 22:04:08 +0000 (15:04 -0700)
This includes an MTU fixup which could affect larger packets with newer
Zaurii, described as http://bugzilla.kernel.org/show_bug.cgi?id=6286;
plus minor whitespace cleanup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/zaurus.c

index f7ac9d6b985687a197994e2211c9ca30cb1649e3..bf2035d329f41ea83f2845d2bde3e25e67a053b1 100644 (file)
@@ -109,7 +109,7 @@ static const struct driver_info     zaurus_sl5x00_info = {
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
-       .tx_fixup =     zaurus_tx_fixup,
+       .tx_fixup =     zaurus_tx_fixup,
 };
 #define        ZAURUS_STRONGARM_INFO   ((unsigned long)&zaurus_sl5x00_info)
 
@@ -119,7 +119,7 @@ static const struct driver_info     zaurus_pxa_info = {
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
-       .tx_fixup =     zaurus_tx_fixup,
+       .tx_fixup =     zaurus_tx_fixup,
 };
 #define        ZAURUS_PXA_INFO         ((unsigned long)&zaurus_pxa_info)
 
@@ -129,7 +129,7 @@ static const struct driver_info     olympus_mxl_info = {
        .check_connect = always_connected,
        .bind =         zaurus_bind,
        .unbind =       usbnet_cdc_unbind,
-       .tx_fixup =     zaurus_tx_fixup,
+       .tx_fixup =     zaurus_tx_fixup,
 };
 #define        OLYMPUS_MXL_INFO        ((unsigned long)&olympus_mxl_info)
 
@@ -228,6 +228,11 @@ bad_detail:
                                                detail->bDetailData[2]);
                                goto bad_desc;
                        }
+
+                       /* same extra framing as for non-BLAN mode */
+                       dev->net->hard_header_len += 6;
+                       dev->rx_urb_size = dev->net->hard_header_len
+                                       + dev->net->mtu;
                        break;
                }
 next_desc:
@@ -258,7 +263,7 @@ static const struct driver_info     bogus_mdlm_info = {
        .description =  "pseudo-MDLM (BLAN) device",
        .flags =        FLAG_FRAMING_Z,
        .check_connect = always_connected,
-       .tx_fixup =     zaurus_tx_fixup,
+       .tx_fixup =     zaurus_tx_fixup,
        .bind =         blan_mdlm_bind,
 };
 
@@ -367,13 +372,13 @@ static struct usb_driver zaurus_driver = {
 
 static int __init zaurus_init(void)
 {
-       return usb_register(&zaurus_driver);
+       return usb_register(&zaurus_driver);
 }
 module_init(zaurus_init);
 
 static void __exit zaurus_exit(void)
 {
-       usb_deregister(&zaurus_driver);
+       usb_deregister(&zaurus_driver);
 }
 module_exit(zaurus_exit);