diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-07-07 18:06:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-08 12:03:20 -0400 |
commit | 498d8e236304a62a2774d7264bdff2c6e8102b5b (patch) | |
tree | c1c5fa5ddf09a76bf0787e09fdc71fb8d5561b1c /drivers/net/pcnet32.c | |
parent | 40f5d72a4fc098c47068e3888cfb055922f6519f (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/pcnet32.c')
-rw-r--r-- | drivers/net/pcnet32.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index b48aba9e4227..8b3090dc4bcd 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -2570,7 +2570,6 @@ static void pcnet32_load_multicast(struct net_device *dev) | |||
2570 | volatile __le16 *mcast_table = (__le16 *)ib->filter; | 2570 | volatile __le16 *mcast_table = (__le16 *)ib->filter; |
2571 | struct netdev_hw_addr *ha; | 2571 | struct netdev_hw_addr *ha; |
2572 | unsigned long ioaddr = dev->base_addr; | 2572 | unsigned long ioaddr = dev->base_addr; |
2573 | char *addrs; | ||
2574 | int i; | 2573 | int i; |
2575 | u32 crc; | 2574 | u32 crc; |
2576 | 2575 | ||
@@ -2590,13 +2589,7 @@ static void pcnet32_load_multicast(struct net_device *dev) | |||
2590 | 2589 | ||
2591 | /* Add addresses */ | 2590 | /* Add addresses */ |
2592 | netdev_for_each_mc_addr(ha, dev) { | 2591 | netdev_for_each_mc_addr(ha, dev) { |
2593 | addrs = ha->addr; | 2592 | crc = ether_crc_le(6, ha->addr); |
2594 | |||
2595 | /* multicast address? */ | ||
2596 | if (!(*addrs & 1)) | ||
2597 | continue; | ||
2598 | |||
2599 | crc = ether_crc_le(6, addrs); | ||
2600 | crc = crc >> 26; | 2593 | crc = crc >> 26; |
2601 | mcast_table[crc >> 4] |= cpu_to_le16(1 << (crc & 0xf)); | 2594 | mcast_table[crc >> 4] |= cpu_to_le16(1 << (crc & 0xf)); |
2602 | } | 2595 | } |