diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2013-07-15 20:20:34 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-08-22 05:25:49 -0400 |
commit | 2ccd994c4c85a787ba4873f1481edd42c4ff46bf (patch) | |
tree | c67dbab539f0c5c5818cd230a60af68f8dd3faac /drivers/net/ethernet | |
parent | 502671967403c611b362836aef8cdee65e9a626a (diff) |
igb: Update MTU so that it is always at least a standard frame size
This change makes it so that we limit the lower bound for max_frame_size to
the size of a standard Ethernet frame. This allows for feature parity with
other Intel based drivers such as ixgbe.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 94295a06c124..1a0137d68109 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -4813,6 +4813,10 @@ static int igb_change_mtu(struct net_device *netdev, int new_mtu) | |||
4813 | return -EINVAL; | 4813 | return -EINVAL; |
4814 | } | 4814 | } |
4815 | 4815 | ||
4816 | /* adjust max frame to be at least the size of a standard frame */ | ||
4817 | if (max_frame < (ETH_FRAME_LEN + ETH_FCS_LEN)) | ||
4818 | max_frame = ETH_FRAME_LEN + ETH_FCS_LEN; | ||
4819 | |||
4816 | while (test_and_set_bit(__IGB_RESETTING, &adapter->state)) | 4820 | while (test_and_set_bit(__IGB_RESETTING, &adapter->state)) |
4817 | msleep(1); | 4821 | msleep(1); |
4818 | 4822 | ||