mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-05 04:33:05 +09:00
net: hns3: fix for changing MTU
[ Upstream commit5bad95a1e5] when changing MTU, The new MTU must need to be set to netdevice. Fixes:a8e8b7ff35("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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
be6a161e13
commit
b20482cebf
@@ -1313,6 +1313,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;
|
||||
|
||||
Reference in New Issue
Block a user