]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/u_ether.c
usb gadget: cdc ethernet notification bugfix
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / u_ether.c
index dbd575a194f3c895e46827a605d9e8984e388fb1..66948b72bb9b06e5c73345322b800af69a9618db 100644 (file)
@@ -873,6 +873,13 @@ struct net_device *gether_connect(struct gether *link)
                spin_lock(&dev->lock);
                dev->port_usb = link;
                link->ioport = dev;
+               if (netif_running(dev->net)) {
+                       if (link->open)
+                               link->open(link);
+               } else {
+                       if (link->close)
+                               link->close(link);
+               }
                spin_unlock(&dev->lock);
 
                netif_carrier_on(dev->net);