diff options
-rw-r--r-- | patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch | 16 | ||||
-rw-r--r-- | patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci | 22 |
2 files changed, 22 insertions, 16 deletions
diff --git a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch deleted file mode 100644 index 86425c66..00000000 --- a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c -+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c -@@ -2452,8 +2452,13 @@ static int igb_get_rss_hash_opts(struct - return 0; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) - static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, - u32 *rule_locs) -+#else -+static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, -+ void *rule_locs) -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */ - { - struct igb_adapter *adapter = netdev_priv(dev); - int ret = -EOPNOTSUPP; diff --git a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci new file mode 100644 index 00000000..e546f4d5 --- /dev/null +++ b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/rxnfc.cocci @@ -0,0 +1,22 @@ +@r@ +identifier s,func; +@@ + +struct ethtool_ops s = { +.get_rxnfc = func, +}; + +@@ +identifier r.func,rule_locs; +typedef u32; +@@ + +// ---------------------------------------------------------------------- + +func(... ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) +,u32 *rule_locs ++#else ++,void *rule_locs ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) */ + ) { ... } |