summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2015-09-22 11:28:14 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-22 17:37:03 -0700
commitfbd03513bf36c4e5c2942f436f05c8eb99a3cc9e (patch)
treea88bf203884c77423aaada7225424fa4545b58aa /net/dsa
parent7def0f952eccdd0edb3c504f4dab35ee0d3aba1f (diff)
downloadop-kernel-dev-fbd03513bf36c4e5c2942f436f05c8eb99a3cc9e.zip
op-kernel-dev-fbd03513bf36c4e5c2942f436f05c8eb99a3cc9e.tar.gz
net: dsa: Fix Marvell Egress Trailer check
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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/tag_trailer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index d25efc9..b6ca089 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -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;
OpenPOWER on IntegriCloud