ltq-ptm: use netif_trans_update() only for kernel >= 4.7
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Feb 2017 00:03:18 +0000 (01:03 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Feb 2017 00:26:33 +0000 (01:26 +0100)
This fixes a bug introduced in commit c7ce9908bd58af60153716aa64a7251
"ltq-ptm: fix build with kernel 4.9"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c

index 2691527693be76c989783388a0919958120980ba..00a967b34b39d934c99a8a436a8b03ec1c851861 100644 (file)
@@ -405,7 +405,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
     /*  allocate descriptor */
     desc_base = get_tx_desc(ndev, &f_full);
     if ( f_full ) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
         netif_trans_update(dev);
 #else
         dev->trans_start = jiffies;
@@ -443,7 +443,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
     g_ptm_priv_data.itf[ndev].stats.tx_packets++;
     g_ptm_priv_data.itf[ndev].stats.tx_bytes += reg_desc.datalen;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
     netif_trans_update(dev);
 #else
     dev->trans_start = jiffies;
index f5a3f8b5c6c606a5a66114abc03ad6a9de945441..0a357f1742bfb2a0ab2ff55767ac2cac85fa28a2 100644 (file)
@@ -289,7 +289,7 @@ 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)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
         netif_trans_update(dev);
 #else
         dev->trans_start = jiffies;
@@ -352,7 +352,7 @@ 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)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
     netif_trans_update(dev);
 #else
     dev->trans_start = jiffies;