net: dsa: lan9303: Learn addresses on CPU port when bridged
authorEgil Hjelmeland <privat@egil-hjelmeland.no>
Thu, 26 Oct 2017 09:00:49 +0000 (11:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Oct 2017 14:30:53 +0000 (23:30 +0900)
commit535f010d4ba798214bbd88ce18a95cd99cd4a8cb
tree12876d038da1bfc14053a53caca56bdbaad16309
parent356c3e9afac0cc19c3d3b0cbc67106ce8efa0743
net: dsa: lan9303: Learn addresses on CPU port when bridged

When CPU transmit directly to port using tag, the LAN9303 does not
learn MAC addresses received on the CPU port into the ALR.
ALR learning is performed only when transmitting using ALR lookup.

Solution:
If the two external ports are bridged and the packet is not STP BPDU,
then use ALR lookup to allow ALR learning on CPU port.
Otherwise transmit directly to port with STP state override.

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_lan9303.c