• Grygorii Strashko's avatar
    drivers: net: cpsw: fix port_mask parameters in ale calls · 61f1cef9
    Grygorii Strashko authored
    ALE APIs expect to receive port masks as input values for arguments
    port_mask, untag, reg_mcast, unreg_mcast. But there are few places in
    code where port masks are passed left-shifted by cpsw_priv->host_port,
    like below:
    
     cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan,
    		  ALE_ALL_PORTS << priv->host_port,
    		  ALE_ALL_PORTS << priv->host_port, 0, 0);
    
    and cpsw is still working just because priv->host_port == 0
    and has never ever been changed.
    
    Hence, fix port_mask parameters in ALE APIs calls and drop
    "<< priv->host_port" from all places where it's used to
    shift valid port mask.
    Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    61f1cef9
cpsw.c 70.7 KB