]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drivers: net: cpsw: fix port_mask parameters in ale calls
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 7 Apr 2016 12:16:43 +0000 (15:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2016 19:11:59 +0000 (15:11 -0400)
commit61f1cef90a18122ff9832a897dc75738c14e710a
tree093f68d1aeadc7c9595ed4e1126c4c4cad426cd0
parent61618eeac3e6165684895481c4f58ea879c3d616
drivers: net: cpsw: fix port_mask parameters in ale calls

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: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c