]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netdev: bfin_mac: use promiscuous flag for promiscuous mode
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 10 May 2010 05:39:12 +0000 (05:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2010 00:21:00 +0000 (17:21 -0700)
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: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bfin_mac.c

index 28f350711267064d39e7a0ca3d5415e78f551e7e..8166611f3cc77f985836538ceeaf76b2fc1c5769 100644 (file)
@@ -1276,7 +1276,7 @@ static void bfin_mac_set_multicast_list(struct net_device *dev)
        if (dev->flags & IFF_PROMISC) {
                printk(KERN_INFO "%s: set to promisc mode\n", dev->name);
                sysctl = bfin_read_EMAC_OPMODE();
-               sysctl |= RAF;
+               sysctl |= PR;
                bfin_write_EMAC_OPMODE(sysctl);
        } else if (dev->flags & IFF_ALLMULTI) {
                /* accept all multicast */