usbnet: allow mini-drivers to consume L2 headers
[linux-2.6-microblaze.git] / drivers / net / usb / usbnet.c
index 0744bf2..0b0ba7e 100644 (file)
@@ -324,7 +324,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
                return;
        }
 
-       skb->protocol = eth_type_trans (skb, dev->net);
+       /* only update if unset to allow minidriver rx_fixup override */
+       if (skb->protocol == 0)
+               skb->protocol = eth_type_trans (skb, dev->net);
+
        dev->net->stats.rx_packets++;
        dev->net->stats.rx_bytes += skb->len;