--- /dev/null
+diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+index f561b7b..b611f5b 100644
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -245,10 +245,12 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ else
+ ecmd->eth_tp_mdix = ETH_TP_MDI_INVALID;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ if (hw->phy.mdix == AUTO_ALL_MODES)
+ ecmd->eth_tp_mdix_ctrl = ETH_TP_MDI_AUTO;
+ else
+ ecmd->eth_tp_mdix_ctrl = hw->phy.mdix;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+
+ return 0;
+ }
+@@ -267,6 +269,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ return -EINVAL;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ /* MDI setting is only allowed when autoneg enabled because
+ * some hardware doesn't allow MDI setting when speed or
+ * duplex is forced.
+@@ -281,6 +284,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ return -EINVAL;
+ }
+ }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+
+ while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
+ usleep_range(1000, 2000);
+@@ -324,6 +328,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ }
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ /* MDI-X => 2; MDI => 1; Auto => 3 */
+ if (ecmd->eth_tp_mdix_ctrl) {
+ /* fix up the value for auto (3 => 0) as zero is mapped
+@@ -334,6 +339,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ else
+ hw->phy.mdix = ecmd->eth_tp_mdix_ctrl;
+ }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+
+ /* reset the link */
+ if (netif_running(adapter->netdev)) {