Skip to content

Commit 5f715c0

Browse files
andrejotadavem330
authored andcommitted
via-rhine: fix VLAN receive handling regression.
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>
1 parent 7de8827 commit 5f715c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/via/via-rhine.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2134,10 +2134,11 @@ static int rhine_rx(struct net_device *dev, int limit)
21342134
}
21352135

21362136
skb_put(skb, pkt_len);
2137-
skb->protocol = eth_type_trans(skb, dev);
21382137

21392138
rhine_rx_vlan_tag(skb, desc, data_size);
21402139

2140+
skb->protocol = eth_type_trans(skb, dev);
2141+
21412142
netif_receive_skb(skb);
21422143

21432144
u64_stats_update_begin(&rp->rx_stats.syncp);

0 commit comments

Comments
 (0)