From: Stefan Assmann Date: Fri, 16 May 2014 11:21:18 +0000 (+0200) Subject: backports: handle new get_ts_info pointer in struct ethtool_ops X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a2aeca729ea2261309134d07a602f64ce2eab9ff;p=openwrt%2Fstaging%2Fblogic.git backports: handle new get_ts_info pointer in struct ethtool_ops In kernel 3.5 struct ethtool_ops received a new function pointer get_ts_info. Address this by putting ifdef around the code. commit c8f3a8c31069137fe0100e6920558f1a7487ef3c Author: Richard Cochran Date: Tue Apr 3 22:59:17 2012 +0000 ethtool: Introduce a method for getting time stamping capabilities. git describe --contains c8f3a8c31069137fe0100e6920558f1a7487ef3c v3.5-rc1~109^2~632 Signed-off-by: Stefan Assmann Signed-off-by: Hauke Mehrtens --- diff --git a/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch b/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch new file mode 100644 index 000000000000..140983442227 --- /dev/null +++ b/patches/collateral-evolutions/network/0017-get_ts_info/igb_get_ts_info.patch @@ -0,0 +1,30 @@ +diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c +index 7c8b9bf..75606be 100644 +--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c ++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c +@@ -2350,6 +2350,7 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data) + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) + static int igb_get_ts_info(struct net_device *dev, + struct ethtool_ts_info *info) + { +@@ -2405,6 +2406,7 @@ static int igb_get_ts_info(struct net_device *dev, + return -EOPNOTSUPP; + } + } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ + + static int igb_get_rss_hash_opts(struct igb_adapter *adapter, + struct ethtool_rxnfc *cmd) +@@ -3019,7 +3021,9 @@ static const struct ethtool_ops igb_ethtool_ops = { + .get_ethtool_stats = igb_get_ethtool_stats, + .get_coalesce = igb_get_coalesce, + .set_coalesce = igb_set_coalesce, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) + .get_ts_info = igb_get_ts_info, ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ + .get_rxnfc = igb_get_rxnfc, + .set_rxnfc = igb_set_rxnfc, + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)