Commit 66350023 authored by Xue Chaojing's avatar Xue Chaojing Committed by David S. Miller

hinic: fix a bug in set rx mode

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: default avatarXue Chaojing <xuechaojing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e56571d
...@@ -724,7 +724,6 @@ static void set_rx_mode(struct work_struct *work) ...@@ -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_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 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"); 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) ...@@ -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_uc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr);
__dev_mc_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) static void hinic_set_rx_mode(struct net_device *netdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment