ltq-ptm: fix build with kernel 4.9
[openwrt/openwrt.git] / package / kernel / lantiq / ltq-ptm / src / ifxmips_ptm_vdsl.c
index bc27c270d825543dfab270ed9767402af5f6ceb4..f5a3f8b5c6c606a5a66114abc03ad6a9de945441 100644 (file)
@@ -289,7 +289,11 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
     /*  allocate descriptor */
     desc_base = get_tx_desc(0, &f_full);
     if ( f_full ) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+        netif_trans_update(dev);
+#else
         dev->trans_start = jiffies;
+#endif
         netif_stop_queue(dev);
 
         IFX_REG_W32_MASK(0, 1 << 17, MBOX_IGU1_ISRC);
@@ -348,7 +352,11 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
     wmb();
     *(volatile unsigned int *)desc = *(unsigned int *)&reg_desc;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+    netif_trans_update(dev);
+#else
     dev->trans_start = jiffies;
+#endif
 
     return 0;