[PATCH] USB: minor gadget/rndis tweak
authorDavid Brownell <david-b@pacbell.net>
Sun, 22 Jan 2006 18:33:27 +0000 (10:33 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:56 +0000 (14:49 -0800)
Resove a minor FIXME:  don't change MTU while RNDIS link is active,
the other end won't expect such things...

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

index afc84cfb61f996fc484308473552deb880839734..04b9743c1c1f6b7bf2d15257661239067f1cc397 100644 (file)
@@ -1549,7 +1549,8 @@ static int eth_change_mtu (struct net_device *net, int new_mtu)
 {
        struct eth_dev  *dev = netdev_priv(net);
 
-       // FIXME if rndis, don't change while link's live
+       if (dev->rndis)
+               return -EBUSY;
 
        if (new_mtu <= ETH_HLEN || new_mtu > ETH_FRAME_LEN)
                return -ERANGE;