]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
net: hns3: Support two vlan header when setting mtu
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / hisilicon / hns3 / hns3_enet.c
index 2096b6146a2be94f0bc72878cf71bd2b0f93ac50..e5f84c44ef213837f5ecb3142359d57282c3a9f7 100644 (file)
@@ -3596,8 +3596,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);