e1000e: Do not allow CRC stripping to be disabled on 82579 w/ jumbo frames
[deliverable/linux.git] / drivers / net / ethernet / intel / e1000e / netdev.c
index 68913d1035421e6e788297ff97f3c12de55db025..7dd2c11c3f61bf42d281f44582a5410cb78bd334 100644 (file)
@@ -6676,6 +6676,19 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter)
        }
 }
 
+static netdev_features_t e1000_fix_features(struct net_device *netdev,
+                                           netdev_features_t features)
+{
+       struct e1000_adapter *adapter = netdev_priv(netdev);
+       struct e1000_hw *hw = &adapter->hw;
+
+       /* Jumbo frame workaround on 82579 and newer requires CRC be stripped */
+       if ((hw->mac.type >= e1000_pch2lan) && (netdev->mtu > ETH_DATA_LEN))
+               features &= ~NETIF_F_RXFCS;
+
+       return features;
+}
+
 static int e1000_set_features(struct net_device *netdev,
                              netdev_features_t features)
 {
@@ -6732,6 +6745,7 @@ static const struct net_device_ops e1000e_netdev_ops = {
        .ndo_poll_controller    = e1000_netpoll,
 #endif
        .ndo_set_features = e1000_set_features,
+       .ndo_fix_features = e1000_fix_features,
 };
 
 /**
This page took 0.027125 seconds and 5 git commands to generate.