Skip to content

Commit

Permalink
net: dsa: Fix Marvell Egress Trailer check
Browse files Browse the repository at this point in the history
The Marvell Egress rx trailer check must be fixed to
correctly detect bad bits in the third byte of the
Eggress trailer as described in the Table 28 of the
88E6060 datasheet.
The current code incorrectly omits to check the third
byte and checks the fourth byte twice.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Neil Armstrong authored and David S. Miller committed Sep 23, 2015
1 parent 7def0f9 commit fbd0351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/tag_trailer.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,

trailer = skb_tail_pointer(skb) - 4;
if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
(trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00)
(trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
goto out_drop;

source_port = trailer[1] & 7;
Expand Down

0 comments on commit fbd0351

Please sign in to comment.