summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-02-06 20:00:36 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-02-07 07:33:09 +0100
commit7b12c2bd0126e93f2c0d88cbe4f59df1325745be (patch)
tree0e739422ae2f39461d2ec912bbef18da503292b2 /backport/backport-include/linux
parent02d81a76898c979eb7571b9aa738d114db71135d (diff)
backports: add netif_trans_update()
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include/linux')
-rw-r--r--backport/backport-include/linux/netdevice.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 639cf1d6..3144dcde 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -330,4 +330,12 @@ static inline void netif_tx_napi_add(struct net_device *dev,
#define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+#define netif_trans_update LINUX_BACKPORT(netif_trans_update)
+static inline void netif_trans_update(struct net_device *dev)
+{
+ dev->trans_start = jiffies;
+}
+#endif
+
#endif /* __BACKPORT_NETDEVICE_H */