]> git.baikalelectronics.ru Git - kernel.git/commit
dsa: tag_dsa: Fix mask for trunked packets
authorAndrew Lunn <andrew@lunn.ch>
Sun, 3 Oct 2021 15:50:53 +0000 (17:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Oct 2021 12:43:55 +0000 (13:43 +0100)
commitca94709aa52039753c0864f6a8b3b6617ca248b8
treea2a40619eddbfa6cc988c3b35514bb4db58e61f4
parentbc05c258aba1f72e7d1b88124e0ec9b2f30a057a
dsa: tag_dsa: Fix mask for trunked packets

A packet received on a trunk will have bit 2 set in Forward DSA tagged
frame. Bit 1 can be either 0 or 1 and is otherwise undefined and bit 0
indicates the frame CFI. Masking with 7 thus results in frames as
being identified as being from a trunk when in fact they are not. Fix
the mask to just look at bit 2.

Fixes: 08e8c13ab28f ("net: dsa: tag_dsa: Support reception of packets from LAG devices")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_dsa.c