aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3
diff options
context:
space:
mode:
authorFuyun Liang <liangfuyun1@huawei.com>2018-03-10 11:29:24 +0800
committerDavid S. Miller <davem@davemloft.net>2018-03-11 22:53:31 -0400
commit20e4bf982b72e5716233542d73b1e516485b71fb (patch)
treea151441558827695145caa69da1f66a9c6ff07c1 /drivers/net/ethernet/hisilicon/hns3
parentnet: hns3: fix for netdev not running problem after calling net_stop and net_open (diff)
downloadlinux-dev-20e4bf982b72e5716233542d73b1e516485b71fb.tar.xz
linux-dev-20e4bf982b72e5716233542d73b1e516485b71fb.zip
net: hns3: fix for ipv6 address loss problem after setting channels
The function of dev_close and dev_open is just likes ifconfig <netif> down and ifconfig <netif> up. The ipv6 address will be lost after dev_close and dev_open are called. This patch uses hns3_nic_net_stop to replace dev_close and uses hns3_nic_net_open to replace dev_open. Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 8113d2236edd..4dba97498b63 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3503,7 +3503,7 @@ int hns3_set_channels(struct net_device *netdev,
return 0;
if (if_running)
- dev_close(netdev);
+ hns3_nic_net_stop(netdev);
hns3_clear_all_ring(h);
@@ -3546,7 +3546,7 @@ int hns3_set_channels(struct net_device *netdev,
open_netdev:
if (if_running)
- dev_open(netdev);
+ hns3_nic_net_open(netdev);
return ret;
}