diff options
author | Yunsheng Lin | 2018-11-18 04:19:10 +0100 |
---|---|---|
committer | David S. Miller | 2018-11-18 06:57:29 +0100 |
commit | a0b4371751bf836fb438877c981bda733f918988 (patch) | |
tree | 3640f2249dd135bf5f5ca887e088614a1695a701 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | |
parent | net: fsl: Use device_type helpers to access the node type (diff) | |
download | kernel-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.c | 5 |
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); |