From: Julian Andres Klode <jak@debian.org>
Date: Thu, 22 Sep 2016 10:52:54 +0200
Subject: Use netif_trans_update() for kernels >= 4.7

This fixes building with kernels 4.7 and 4.8.

Bug-Debian: https://bugs.debian.org/837329
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1625089
---
 driver/wrapndis.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/driver/wrapndis.c b/driver/wrapndis.c
index 902ce94..870e4c2 100644
--- a/driver/wrapndis.c
+++ b/driver/wrapndis.c
@@ -704,7 +704,11 @@ static void tx_worker(struct work_struct *work)
 			n = wnd->max_tx_packets;
 		n = mp_tx_packets(wnd, wnd->tx_ring_start, n);
 		if (n) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
+			netif_trans_update(wnd->net_dev);
+#else
 			wnd->net_dev->trans_start = jiffies;
+#endif
 			wnd->tx_ring_start =
 				(wnd->tx_ring_start + n) % TX_RING_SIZE;
 			wnd->is_tx_ring_full = 0;
