net: ethernet: ti: ale: ensure vlan/mdb deleted when no members
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 29 Nov 2019 17:58:09 +0000 (19:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Nov 2019 17:45:29 +0000 (09:45 -0800)
commit395eba7d0c122c650fb8b6ae8c6815cbfdc39ca9
tree2a5b20acc51793b5368e340fa977e8ac6d01ef30
parent5f9fc3325ef95398c363b9b7813a7e99d4d85d7d
net: ethernet: ti: ale: ensure vlan/mdb deleted when no members

The recently updated ALE APIs cpsw_ale_del_mcast() and
cpsw_ale_del_vlan_modify() have an issue and will not delete ALE entry even
if VLAN/mcast group has no more members. Hence fix it here and delete ALE
entry if !port_mask.

The issue affected only new cpsw switchdev driver.

Fixes: e85c14370783 ("net: ethernet: ti: ale: modify vlan/mdb api for switchdev")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c