hinic: fix a bug in set rx mode
authorXue Chaojing <xuechaojing@huawei.com>
Mon, 27 May 2019 22:10:05 +0000 (22:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 00:24:42 +0000 (17:24 -0700)
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>
drivers/net/ethernet/huawei/hinic/hinic_main.c

index e64bc66..cfd3f42 100644 (file)
@@ -724,7 +724,6 @@ 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");
 
@@ -732,9 +731,6 @@ static void set_rx_mode(struct work_struct *work)
 
        __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)