Skip to content

Commit

Permalink
hinic: fix a bug in set rx mode
Browse files Browse the repository at this point in the history
in set_rx_mode, __dev_mc_sync and netdev_for_each_mc_addr will
repeatedly set the multicast mac address. so we delete this loop.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Xue Chaojing authored and David S. Miller committed May 29, 2019
1 parent 2e56571 commit 6635002
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/ethernet/huawei/hinic/hinic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,17 +724,13 @@ static void set_rx_mode(struct work_struct *work)
{
struct hinic_rx_mode_work *rx_mode_work = work_to_rx_mode_work(work);
struct hinic_dev *nic_dev = rx_mode_work_to_nic_dev(rx_mode_work);
struct netdev_hw_addr *ha;

netif_info(nic_dev, drv, nic_dev->netdev, "set rx mode work\n");

hinic_port_set_rx_mode(nic_dev, rx_mode_work->rx_mode);

__dev_uc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr);
__dev_mc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr);

netdev_for_each_mc_addr(ha, nic_dev->netdev)
add_mac_addr(nic_dev->netdev, ha->addr);
}

static void hinic_set_rx_mode(struct net_device *netdev)
Expand Down

0 comments on commit 6635002

Please sign in to comment.