]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: Fix the vlan used by host ports
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 23 Dec 2021 14:01:13 +0000 (15:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Dec 2021 12:16:30 +0000 (12:16 +0000)
commit49b8c53504a67520611ee1b511de2dcb652ac89c
tree9091431ed27c9f903c7e5d66394b0612c2708a87
parent923b19493da1217ab8c869af480afb33c2a8b2c0
net: lan966x: Fix the vlan used by host ports

The blamed commit changed the vlan used by the host ports to be 4095
instead of 0.
Because of this change the following issues are seen:
- when the port is probed first it was adding an entry in the MAC table
  with the wrong vlan (port->pvid which is default 0) and not HOST_PVID
- when the port is removed from a bridge, it was using the wrong vlan to
  add entries in the MAC table. It was using the old PVID and not the
  HOST_PVID

This patch fixes this two issues by using the HOST_PVID instead of
port->pvid.

Fixes: 8047b236200bd6 ("net: lan966x: Add vlan support.")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c