summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/arc
diff options
context:
space:
mode:
authorAlexander Kochetkov <al.kochet@gmail.com>2016-11-14 16:32:53 +0300
committerDavid S. Miller <davem@davemloft.net>2016-11-15 19:58:13 -0500
commitd0e3f65b34c528ec2b7d1ba9a620b483f71788d3 (patch)
tree87af8020e550b82ebb8ec85dab07fe10c07912b8 /drivers/net/ethernet/arc
parentc7a4e3d8c0d43a4f31f8b2ccf476e5a26eb85142 (diff)
downloadlinux-d0e3f65b34c528ec2b7d1ba9a620b483f71788d3.tar.bz2
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: Alexander Kochetkov <al.kochet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc')
-rw-r--r--drivers/net/ethernet/arc/emac_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 2e4ee86a7e51..be865b4dada2 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -460,7 +460,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
if (ndev->flags & IFF_ALLMULTI) {
arc_reg_set(priv, R_LAFL, ~0);
arc_reg_set(priv, R_LAFH, ~0);
- } else {
+ } else if (ndev->flags & IFF_MULTICAST) {
struct netdev_hw_addr *ha;
unsigned int filter[2] = { 0, 0 };
int bit;
@@ -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_LAFH, filter[1]);
+ } else {
+ arc_reg_set(priv, R_LAFL, 0);
+ arc_reg_set(priv, R_LAFH, 0);
}
}
}