Commit 81e0ce79 authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller
Browse files

usbnet: allow mini-drivers to consume L2 headers

Assume the minidriver has taken care of all L2 header parsing
if it sets skb->protocol.  This allows the minidriver to
support non-ethernet L2 headers, and even operate without
any L2 header at all.

Signed-off-by: default avatarBjørn Mork <>
Acked-by: default avatarOliver Neukum <>
Signed-off-by: default avatarDavid S. Miller <>
parent 544c8f65
......@@ -324,7 +324,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
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_bytes += skb->len;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment