Message ID | 20151014221437.GA8065@electric-eye.fr.zoreil.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On 14 Oct 2015, Francois Romieu told this: > From: Andrej Ota <andrej@ota.si> > > Because eth_type_trans() consumes ethernet header worth of bytes, a call > to read TCI from end of packet using rhine_rx_vlan_tag() no longer works > as it's reading from an invalid offset. > > Tested to be working on PCEngines Alix board. LGTM, though not tested because I don't have any vlans set up on my VIA Rhine box and I can't reboot it at the moment. :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Francois Romieu <romieu@fr.zoreil.com> Date: Thu, 15 Oct 2015 00:14:37 +0200 > From: Andrej Ota <andrej@ota.si> > > Because eth_type_trans() consumes ethernet header worth of bytes, a call > to read TCI from end of packet using rhine_rx_vlan_tag() no longer works > as it's reading from an invalid offset. > > Tested to be working on PCEngines Alix board. > > Fixes: 810f19bcb862 ("via-rhine: add consistent memory barrier in vlan receive code.") > Signed-off-by: Andrej Ota <andrej@ota.si> > Acked-by: Francois Romieu <romieu@fr.zoreil.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index a832637..2b7550c 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c @@ -2134,10 +2134,11 @@ static int rhine_rx(struct net_device *dev, int limit) } skb_put(skb, pkt_len); - skb->protocol = eth_type_trans(skb, dev); rhine_rx_vlan_tag(skb, desc, data_size); + skb->protocol = eth_type_trans(skb, dev); + netif_receive_skb(skb); u64_stats_update_begin(&rp->rx_stats.syncp);