public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] hinic: fix a bug in set rx mode
@ 2019-05-27 22:10 Xue Chaojing
  2019-05-29  0:24 ` David Miller
  2019-06-11  0:45 ` dann frazier
  0 siblings, 2 replies; 4+ messages in thread
From: Xue Chaojing @ 2019-05-27 22:10 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, netdev, luoshaokai, cloud.wangxiaoyun, xuechaojing

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>
---
 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 e64bc664f687..cfd3f4232cac 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -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)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-11  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-27 22:10 [PATCH net-next] hinic: fix a bug in set rx mode Xue Chaojing
2019-05-29  0:24 ` David Miller
2019-06-11  0:45 ` dann frazier
2019-06-11  1:30   ` xuechaojing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox