Skip to content

Commit

Permalink
r8169: use new helper eth_hw_addr_crc
Browse files Browse the repository at this point in the history
Use new helper eth_hw_addr_crc to simplify the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed May 4, 2020
1 parent b86cd70 commit bc54ac3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/in.h>
#include <linux/io.h>
#include <linux/ip.h>
Expand Down Expand Up @@ -2610,7 +2609,7 @@ static void rtl_set_rx_mode(struct net_device *dev)

mc_filter[1] = mc_filter[0] = 0;
netdev_for_each_mc_addr(ha, dev) {
u32 bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
u32 bit_nr = eth_hw_addr_crc(ha) >> 26;
mc_filter[bit_nr >> 5] |= BIT(bit_nr & 31);
}

Expand Down

0 comments on commit bc54ac3

Please sign in to comment.