aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-ptm
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-02-11 16:48:43 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2017-02-11 23:31:47 +0100
commitc7ce9908bd58af60153716aa64a72510a3a26b35 (patch)
treea7745afc0de742570b131ae22a64b4c5f81e3166 /package/kernel/lantiq/ltq-ptm
parentd61a799528244901b3b6c801e2b53c75ea1e4843 (diff)
downloadupstream-c7ce9908bd58af60153716aa64a72510a3a26b35.tar.gz
upstream-c7ce9908bd58af60153716aa64a72510a3a26b35.tar.bz2
upstream-c7ce9908bd58af60153716aa64a72510a3a26b35.zip
ltq-ptm: fix build with kernel 4.9
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel/lantiq/ltq-ptm')
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c8
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
index b096b0a702..2691527693 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
@@ -405,7 +405,11 @@ 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)
+ netif_trans_update(dev);
+#else
dev->trans_start = jiffies;
+#endif
netif_stop_queue(dev);
IFX_REG_W32_MASK(0, 1 << (ndev + 16), MBOX_IGU1_ISRC);
@@ -439,7 +443,11 @@ 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)
+ netif_trans_update(dev);
+#else
dev->trans_start = jiffies;
+#endif
mailbox_signal(ndev, 1);
adsl_led_flash();
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index bc27c270d8..f5a3f8b5c6 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -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;