Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: de4x5: 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.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Tobias Klauser and committed by
David S. Miller
e77aeb71 b9ab82c7

+1 -4
+1 -4
drivers/net/tulip/de4x5.c
··· 1964 1964 omr |= OMR_PM; /* Pass all multicasts */ 1965 1965 } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ 1966 1966 netdev_for_each_mc_addr(ha, dev) { 1967 - addrs = ha->addr; 1968 - if ((*addrs & 0x01) == 1) { /* multicast address? */ 1969 - crc = ether_crc_le(ETH_ALEN, addrs); 1967 + crc = ether_crc_le(ETH_ALEN, ha->addr); 1970 1968 hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ 1971 1969 1972 1970 byte = hashcode >> 3; /* bit[3-8] -> byte in filter */ ··· 1975 1977 byte -= 1; 1976 1978 } 1977 1979 lp->setup_frame[byte] |= bit; 1978 - } 1979 1980 } 1980 1981 } else { /* Perfect filtering */ 1981 1982 netdev_for_each_mc_addr(ha, dev) {