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

Commit 42c783c5 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Garzik
Browse files

ixgbe: limit small mtu to minimum for ipv4 support

parent f47cf66e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2839,8 +2839,8 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
	int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;


	if ((max_frame < (ETH_ZLEN + ETH_FCS_LEN)) ||
	/* MTU < 68 is an error and causes problems on some kernels */
	    (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
	if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
		return -EINVAL;
		return -EINVAL;


	DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",
	DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",