Skip to content

Commit

Permalink
via-rhine: fix VLAN receive handling regression.
Browse files Browse the repository at this point in the history
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: 810f19b ("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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrej Ota authored and David S. Miller committed Oct 16, 2015
1 parent 7de8827 commit 5f715c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/via/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5f715c0

Please sign in to comment.