aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/declance.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2011-07-07 18:06:26 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-08 12:03:20 -0400
commit498d8e236304a62a2774d7264bdff2c6e8102b5b (patch)
treec1c5fa5ddf09a76bf0787e09fdc71fb8d5561b1c /drivers/net/declance.c
parent40f5d72a4fc098c47068e3888cfb055922f6519f (diff)
drivers/net: Omit check for multicast bit in netdev_for_each_mc_addr
There is no need to check for the address being a multicast address in the netdev_for_each_mc_addr loop, so remove it. This patch covers all remaining network drivers still containing such a check. Cc: Joe Perches <joe@perches.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/declance.c')
-rw-r--r--drivers/net/declance.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index cabd3a542ef0..d5598f6584a3 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -946,7 +946,6 @@ static void lance_load_multicast(struct net_device *dev)
946 struct lance_private *lp = netdev_priv(dev); 946 struct lance_private *lp = netdev_priv(dev);
947 volatile u16 *ib = (volatile u16 *)dev->mem_start; 947 volatile u16 *ib = (volatile u16 *)dev->mem_start;
948 struct netdev_hw_addr *ha; 948 struct netdev_hw_addr *ha;
949 char *addrs;
950 u32 crc; 949 u32 crc;
951 950
952 /* set all multicast bits */ 951 /* set all multicast bits */
@@ -965,13 +964,7 @@ static void lance_load_multicast(struct net_device *dev)
965 964
966 /* Add addresses */ 965 /* Add addresses */
967 netdev_for_each_mc_addr(ha, dev) { 966 netdev_for_each_mc_addr(ha, dev) {
968 addrs = ha->addr; 967 crc = ether_crc_le(ETH_ALEN, ha->addr);
969
970 /* multicast address? */
971 if (!(*addrs & 1))
972 continue;
973
974 crc = ether_crc_le(ETH_ALEN, addrs);
975 crc = crc >> 26; 968 crc = crc >> 26;
976 *lib_ptr(ib, filter[crc >> 4], lp->type) |= 1 << (crc & 0xf); 969 *lib_ptr(ib, filter[crc >> 4], lp->type) |= 1 << (crc & 0xf);
977 } 970 }