diff options
author | Stefan Assmann <sassmann@kpanic.de> | 2015-02-25 15:20:47 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-04-06 13:57:19 +0200 |
commit | 59ebee083e739a43c431a3fb175c4ba68955996d (patch) | |
tree | 37e2481c98dd48eb28c2d9f80e29622594c1e282 /patches | |
parent | f7028e9824bcdac5e050636663b80f693f4ce7b5 (diff) |
backports: replace struct ethtool_ops get_module changes with smpl patch
Also required a refreshed of patch
patches/collateral-evolutions/network/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches')
3 files changed, 38 insertions, 30 deletions
diff --git a/patches/collateral-evolutions/network/0037-ethtool_get_module/get_module.cocci b/patches/collateral-evolutions/network/0037-ethtool_get_module/get_module.cocci new file mode 100644 index 00000000..c04ccc41 --- /dev/null +++ b/patches/collateral-evolutions/network/0037-ethtool_get_module/get_module.cocci @@ -0,0 +1,37 @@ +@r1@ +identifier s, func; +@@ + +struct ethtool_ops s = { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +.get_module_info = func, ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +}; + +@r2@ +identifier s, func; +@@ + +struct ethtool_ops s = { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +.get_module_eeprom = func, ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +}; + +// ---------------------------------------------------------------------- + +@@ +identifier r1.func; +@@ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +func(...) { ... } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ + +@@ +identifier r2.func; +@@ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +func(...) { ... } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ diff --git a/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch b/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch deleted file mode 100644 index 074ccea6..00000000 --- a/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c -+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c -@@ -2747,6 +2747,7 @@ static int igb_set_eee(struct net_device - } - #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */ - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) - static int igb_get_module_info(struct net_device *netdev, - struct ethtool_modinfo *modinfo) - { -@@ -2827,6 +2828,7 @@ static int igb_get_module_eeprom(struct - - return 0; - } -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ - - static int igb_ethtool_begin(struct net_device *netdev) - { -@@ -3055,8 +3057,10 @@ static const struct ethtool_ops igb_etht - .get_eee = igb_get_eee, - .set_eee = igb_set_eee, - #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) - .get_module_info = igb_get_module_info, - .get_module_eeprom = igb_get_module_eeprom, -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ - .get_rxfh_indir_size = igb_get_rxfh_indir_size, - .get_rxfh = igb_get_rxfh, - .set_rxfh = igb_set_rxfh, diff --git a/patches/collateral-evolutions/network/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch b/patches/collateral-evolutions/network/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch index 1ccec4e3..7661edf5 100644 --- a/patches/collateral-evolutions/network/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch +++ b/patches/collateral-evolutions/network/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch @@ -75,9 +75,9 @@ static unsigned int igb_max_channels(struct igb_adapter *adapter) { @@ -3061,9 +3082,15 @@ static const struct ethtool_ops igb_etht + .set_eee = igb_set_eee, .get_module_info = igb_get_module_info, .get_module_eeprom = igb_get_module_eeprom, - #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) .get_rxfh_indir_size = igb_get_rxfh_indir_size, .get_rxfh = igb_get_rxfh, |