diff options
author | Fuyun Liang <liangfuyun1@huawei.com> | 2018-01-05 18:18:20 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-08 14:06:19 -0500 |
commit | 5bad95a1e55f4d5bb41e130db859d57eaf1b1549 (patch) | |
tree | ac5bc434e9aebc468c2644760052541559a25184 /drivers/net/ethernet/hisilicon | |
parent | 2866ccb2b8f8df48c73f2fcc76454cac6c7cc557 (diff) | |
download | linux-5bad95a1e55f4d5bb41e130db859d57eaf1b1549.tar.bz2 |
net: hns3: fix for changing MTU
when changing MTU, The new MTU must need to be set to netdevice.
Fixes: a8e8b7ff3517 ("net: hns3: Add support to change MTU in HNS3 hardware")
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')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index eb9ac53902c8..b23107d7821f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1413,6 +1413,8 @@ static int hns3_nic_change_mtu(struct net_device *netdev, int new_mtu) return ret; } + netdev->mtu = new_mtu; + /* if the netdev was running earlier, bring it up again */ if (if_running && hns3_nic_net_open(netdev)) ret = -EINVAL; |