Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4dd5608 authored by Alexander Sverdlin's avatar Alexander Sverdlin Committed by David S. Miller
Browse files

net: ethernet: octeon_mgmt: Account for second possible VLAN header



Octeon's input ring-buffer entry has 14 bits-wide size field, so to account
for second possible VLAN header max_mtu must be further reduced.

Fixes: 109cc165 ("ethernet/cavium: use core min/max MTU checking")
Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0a31262
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1499,7 +1499,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
	netdev->ethtool_ops = &octeon_mgmt_ethtool_ops;
	netdev->ethtool_ops = &octeon_mgmt_ethtool_ops;


	netdev->min_mtu = 64 - OCTEON_MGMT_RX_HEADROOM;
	netdev->min_mtu = 64 - OCTEON_MGMT_RX_HEADROOM;
	netdev->max_mtu = 16383 - OCTEON_MGMT_RX_HEADROOM;
	netdev->max_mtu = 16383 - OCTEON_MGMT_RX_HEADROOM - VLAN_HLEN;


	mac = of_get_mac_address(pdev->dev.of_node);
	mac = of_get_mac_address(pdev->dev.of_node);