summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
diff options
context:
space:
mode:
authorYunsheng Lin2018-11-18 04:19:10 +0100
committerDavid S. Miller2018-11-18 06:57:29 +0100
commita0b4371751bf836fb438877c981bda733f918988 (patch)
tree3640f2249dd135bf5f5ca887e088614a1695a701 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
parentnet: fsl: Use device_type helpers to access the node type (diff)
downloadkernel-qcow2-linux-a0b4371751bf836fb438877c981bda733f918988.tar.gz
kernel-qcow2-linux-a0b4371751bf836fb438877c981bda733f918988.tar.xz
kernel-qcow2-linux-a0b4371751bf836fb438877c981bda733f918988.zip
net: hns3: Support two vlan header when setting mtu
This patch adds supports for two vlan header when setting mtu. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 22220af92aa9..c944090d3adf 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3609,8 +3609,9 @@ static int hns3_client_init(struct hnae3_handle *handle)
hns3_dcbnl_setup(handle);
- /* MTU range: (ETH_MIN_MTU(kernel default) - 9706) */
- netdev->max_mtu = HNS3_MAX_MTU - (ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
+ /* MTU range: (ETH_MIN_MTU(kernel default) - 9702) */
+ netdev->max_mtu =
+ HNS3_MAX_MTU - (ETH_HLEN + ETH_FCS_LEN + 2 * VLAN_HLEN);
set_bit(HNS3_NIC_STATE_INITED, &priv->state);