aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 60cad65dbc2e..0e72dadf8b70 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1566,9 +1566,9 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu)
1566 int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; 1566 int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
1567 int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; 1567 int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
1568 1568
1569 1569 /* MTU < 68 is an error for IPv4 traffic, just don't allow it */
1570 if((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) 1570 if ((new_mtu < 68) ||
1571 || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { 1571 (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) {
1572 DPRINTK(PROBE, ERR, "Invalid MTU setting %d\n", new_mtu); 1572 DPRINTK(PROBE, ERR, "Invalid MTU setting %d\n", new_mtu);
1573 return -EINVAL; 1573 return -EINVAL;
1574 } 1574 }