diff options
-rw-r--r-- | drivers/net/benet/be_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 99061488eeb3..c65c63427d41 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -473,10 +473,12 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) | |||
473 | { | 473 | { |
474 | struct be_adapter *adapter = netdev_priv(netdev); | 474 | struct be_adapter *adapter = netdev_priv(netdev); |
475 | if (new_mtu < BE_MIN_MTU || | 475 | if (new_mtu < BE_MIN_MTU || |
476 | new_mtu > BE_MAX_JUMBO_FRAME_SIZE) { | 476 | new_mtu > (BE_MAX_JUMBO_FRAME_SIZE - |
477 | (ETH_HLEN + ETH_FCS_LEN))) { | ||
477 | dev_info(&adapter->pdev->dev, | 478 | dev_info(&adapter->pdev->dev, |
478 | "MTU must be between %d and %d bytes\n", | 479 | "MTU must be between %d and %d bytes\n", |
479 | BE_MIN_MTU, BE_MAX_JUMBO_FRAME_SIZE); | 480 | BE_MIN_MTU, |
481 | (BE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN))); | ||
480 | return -EINVAL; | 482 | return -EINVAL; |
481 | } | 483 | } |
482 | dev_info(&adapter->pdev->dev, "MTU changed from %d to %d bytes\n", | 484 | dev_info(&adapter->pdev->dev, "MTU changed from %d to %d bytes\n", |