Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826AbeAEJuX (ORCPT + 1 other); Fri, 5 Jan 2018 04:50:23 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3690 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751528AbeAEJtU (ORCPT ); Fri, 5 Jan 2018 04:49:20 -0500 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 16/20] net: hns3: fix for changing MTU Date: Fri, 5 Jan 2018 18:18:20 +0800 Message-ID: <1515147504-86802-17-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515147504-86802-1-git-send-email-lipeng321@huawei.com> References: <1515147504-86802-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Fuyun Liang 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 Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index eb9ac53..b23107d 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; -- 1.9.1