Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0da776b authored by Sonic Zhang's avatar Sonic Zhang Committed by David S. Miller
Browse files

netdev: bfin_mac: use promiscuous flag for promiscuous mode



Rather than using the Receive All Frames (RAF) bit to enable promiscuous
mode, use the Promiscuous (PR) bit.  This lowers overhead at runtime as
we let the hardware process the packets that should actually be checked.

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53fd3f28
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1276,7 +1276,7 @@ static void bfin_mac_set_multicast_list(struct net_device *dev)
	if (dev->flags & IFF_PROMISC) {
	if (dev->flags & IFF_PROMISC) {
		printk(KERN_INFO "%s: set to promisc mode\n", dev->name);
		printk(KERN_INFO "%s: set to promisc mode\n", dev->name);
		sysctl = bfin_read_EMAC_OPMODE();
		sysctl = bfin_read_EMAC_OPMODE();
		sysctl |= RAF;
		sysctl |= PR;
		bfin_write_EMAC_OPMODE(sysctl);
		bfin_write_EMAC_OPMODE(sysctl);
	} else if (dev->flags & IFF_ALLMULTI) {
	} else if (dev->flags & IFF_ALLMULTI) {
		/* accept all multicast */
		/* accept all multicast */