backports: handle new get_eee and set_eee pointers in struct ethtool_ops
authorStefan Assmann <sassmann@kpanic.de>
Fri, 16 May 2014 11:21:17 +0000 (13:21 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Jun 2014 22:16:14 +0000 (00:16 +0200)
In kernel 3.6 struct ethtool_ops received 2 new function pointers get_eee
and set_eee. Address this by putting ifdef around the code.

commit 80f12eccce775dc6bb93dba9b52529740f929237
Author: Yuval Mintz <yuvalmin@broadcom.com>
Date:   Wed Jun 6 17:13:06 2012 +0000

    Added kernel support in EEE Ethtool commands

git describe --contains 80f12eccce775dc6bb93dba9b52529740f929237
v3.6-rc1~125^2~587

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/0036-ethtool_eee/INFO [new file with mode: 0644]
patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/0036-ethtool_eee/INFO b/patches/collateral-evolutions/network/0036-ethtool_eee/INFO
new file mode 100644 (file)
index 0000000..32650f7
--- /dev/null
@@ -0,0 +1,12 @@
+In kernel 3.6 struct ethtool_ops received 2 new function pointers get_eee
+and set_eee. Address this by putting ifdef around the code.
+
+
+commit 80f12eccce775dc6bb93dba9b52529740f929237
+Author: Yuval Mintz <yuvalmin@broadcom.com>
+Date:   Wed Jun 6 17:13:06 2012 +0000
+
+    Added kernel support in EEE Ethtool commands
+
+git describe --contains 80f12eccce775dc6bb93dba9b52529740f929237
+v3.6-rc1~125^2~587
diff --git a/patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch b/patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch
new file mode 100644 (file)
index 0000000..dcc5b2b
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+index 333a2b0..7c8b9bf 100644
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -2589,6 +2589,7 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
+       return ret;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+ static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+ {
+       struct igb_adapter *adapter = netdev_priv(netdev);
+@@ -2730,6 +2731,7 @@ static int igb_set_eee(struct net_device *netdev,
+       return 0;
+ }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
+ static int igb_get_module_info(struct net_device *netdev,
+                              struct ethtool_modinfo *modinfo)
+@@ -3020,8 +3022,10 @@ static const struct ethtool_ops igb_ethtool_ops = {
+       .get_ts_info            = igb_get_ts_info,
+       .get_rxnfc              = igb_get_rxnfc,
+       .set_rxnfc              = igb_set_rxnfc,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+       .get_eee                = igb_get_eee,
+       .set_eee                = igb_set_eee,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
+       .get_module_info        = igb_get_module_info,
+       .get_module_eeprom      = igb_get_module_eeprom,
+       .get_rxfh_indir_size    = igb_get_rxfh_indir_size,