[PATCH net-next 03/12] net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-09 Thread Peng Li
From: Fuyun Liang 

The function of dev_close and dev_open is just likes ifconfig  down
and ifconfig  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 
Signed-off-by: Peng Li 
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++--
 1 file 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 8113d22..4dba974 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;
 }
-- 
2.9.3



[PATCH net-next 03/12] net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-09 Thread Peng Li
From: Fuyun Liang 

The function of dev_close and dev_open is just likes ifconfig  down
and ifconfig  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 
Signed-off-by: Peng Li 
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++--
 1 file 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 8113d22..4dba974 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;
 }
-- 
2.9.3