summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000e
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2014-04-05 08:25:26 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-04-19 03:03:40 +0200
commitc751a3d58cf2dae89ec941a259025b0175d67b0c (patch)
tree825113aa4f97c66a68e84c02da05f05be6363b80 /drivers/net/ethernet/intel/e1000e
parenti40e: fix TCP flag replication for hardware offload (diff)
downloadlinux-c751a3d58cf2dae89ec941a259025b0175d67b0c.tar.xz
linux-c751a3d58cf2dae89ec941a259025b0175d67b0c.zip
e1000e: Correctly include VLAN_HLEN when changing interface MTU
When changing the interface mtu, the driver starts with a value that doesn't include VLAN_HLEN. Later tests in the driver set the rx_buffer_len based on the mtu. As a result, when the user increases the mtu to 1504 (to support 802.1AD for example), the driver rx_buffer_len does not change and frames longer the 1522 bytes are rejected as too long. Include VLAN_HLEN from the start so that an user mtu greater then 1500 bytes is correctly reflected in the driver rx_buffer_len. CC: e1000-devel@lists.sourceforge.net Signed-off-by: Vlad Yasevich <vyasevic@redhat.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/intel/e1000e')
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index d50c91e50528..165f7bcd66ae 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5687,7 +5687,7 @@ struct rtnl_link_stats64 *e1000e_get_stats64(struct net_device *netdev,
static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
- int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
+ int max_frame = new_mtu + VLAN_HLEN + ETH_HLEN + ETH_FCS_LEN;
/* Jumbo frame support */
if ((max_frame > ETH_FRAME_LEN + ETH_FCS_LEN) &&