net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac mode
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 26 Apr 2019 17:12:33 +0000 (20:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2019 21:11:49 +0000 (17:11 -0400)
commit06095f34f8a0a2c4c83a19514c272699edd5f80b
treea219665d9938d1d78a876e947cf491c70fa44de4
parent91c88659a7e85d0723ea95bd54f7a64d1a45d27c
net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac mode

Now CPSW ALE will set/clean Host port bit in Unregistered Multicast Flood
Mask (UNREG_MCAST_FLOOD_MASK) for every VLAN without checking if this port
belongs to VLAN or not when ALLMULTI mode flag is set for nedev. This is
working in non dual_mac mode, but in dual_mac - it causes
enabling/disabling ALLMULTI flag for both ports.

Hence fix it by adding additional parameter to cpsw_ale_set_allmulti() to
specify ALE port number for which ALLMULTI has to be enabled and check if
port belongs to VLAN before modifying UNREG_MCAST_FLOOD_MASK.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_ale.h