Commit d0e3f65b authored by Alexander Kochetkov's avatar Alexander Kochetkov Committed by David S. Miller

net: arc_emac: don't pass multicast packets to kernel in non-multicast mode

The patch disable capturing multicast packets when multicast mode
disabled for ethernet ('ifconfig eth0 -multicast'). In that case
no multicast packet will be passed to kernel.
Signed-off-by: default avatarAlexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7a4e3d8
...@@ -460,7 +460,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev) ...@@ -460,7 +460,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
if (ndev->flags & IFF_ALLMULTI) { if (ndev->flags & IFF_ALLMULTI) {
arc_reg_set(priv, R_LAFL, ~0); arc_reg_set(priv, R_LAFL, ~0);
arc_reg_set(priv, R_LAFH, ~0); arc_reg_set(priv, R_LAFH, ~0);
} else { } else if (ndev->flags & IFF_MULTICAST) {
struct netdev_hw_addr *ha; struct netdev_hw_addr *ha;
unsigned int filter[2] = { 0, 0 }; unsigned int filter[2] = { 0, 0 };
int bit; int bit;
...@@ -472,6 +472,9 @@ static void arc_emac_set_rx_mode(struct net_device *ndev) ...@@ -472,6 +472,9 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
arc_reg_set(priv, R_LAFL, filter[0]); arc_reg_set(priv, R_LAFL, filter[0]);
arc_reg_set(priv, R_LAFH, filter[1]); arc_reg_set(priv, R_LAFH, filter[1]);
} else {
arc_reg_set(priv, R_LAFL, 0);
arc_reg_set(priv, R_LAFH, 0);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment