From: Stefan Assmann Date: Fri, 16 May 2014 11:21:21 +0000 (+0200) Subject: backports: handle argument type change of get_rxnfc in struct ethtool_ops X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cf7fdd8649551f063fde4b175f4ab648dd61ab9d;p=openwrt%2Fstaging%2Fblogic.git backports: handle argument type change of get_rxnfc in struct ethtool_ops In kernel 3.2 an argument type of function pointer get_rxnfc in struct ethtool_ops changed from void to u32. Address this by putting ifdef around the code. commit 815c7db5c809ea3d5735de3131ecdf758b0e14ff Author: Ben Hutchings Date: Tue Sep 6 13:49:12 2011 +0000 ethtool: Clean up definitions of rule location arrays in RX NFC git describe --contains 815c7db5c809ea3d5735de3131ecdf758b0e14ff v3.2-rc1~129^2~272 Signed-off-by: Stefan Assmann Signed-off-by: Hauke Mehrtens --- diff --git a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/INFO b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/INFO new file mode 100644 index 000000000000..55ad38029080 --- /dev/null +++ b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/INFO @@ -0,0 +1,14 @@ +In kernel 3.2 an argument type of function pointer get_rxnfc in +struct ethtool_ops changed from void to u32. +Address this by putting ifdef around the code. + + +commit 815c7db5c809ea3d5735de3131ecdf758b0e14ff +Author: Ben Hutchings +Date: Tue Sep 6 13:49:12 2011 +0000 + + ethtool: Clean up definitions of rule location arrays in RX NFC + +git describe --contains 815c7db5c809ea3d5735de3131ecdf758b0e14ff +v3.2-rc1~129^2~272 + diff --git a/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch new file mode 100644 index 000000000000..875b97af7994 --- /dev/null +++ b/patches/collateral-evolutions/network/0039-ethtool_rxnfc/igb_rxnfc.patch @@ -0,0 +1,18 @@ +diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c +index 03fe81a..f561b7b 100644 +--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c ++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c +@@ -2450,8 +2450,13 @@ static int igb_get_rss_hash_opts(struct igb_adapter *adapter, + 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;