mirror of https://github.com/hak5/openwrt-owl.git
ltq-ptm: use netif_trans_update() only for kernel >= 4.7
This fixes a bug introduced in commit c7ce9908bd
"ltq-ptm: fix build with kernel 4.9"
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
owl
parent
863e79f8d5
commit
2eed1179be
|
@ -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;
|
||||
|
|
|
@ -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 *)®_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;
|
||||
|
|
Loading…
Reference in New Issue