[PATCH][Unstable][SRU Disco][SRU Cosmic][SRU Bionic] hinic: fix a bug in set rx mode

dann frazier dann.frazier at canonical.com
Tue Jun 18 00:26:07 UTC 2019

From: Xue Chaojing <xuechaojing at huawei.com>

BugLink: https://bugs.launchpad.net/bugs/1832048

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 at huawei.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 66350023d57560b2ead168af098fc507e58d8e6a linux-next)
Signed-off-by: dann frazier <dann.frazier at canonical.com>
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index da323b9e1f62f..51f0bc8775b04 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -723,7 +723,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");
@@ -731,9 +730,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)

More information about the kernel-team mailing list