ltq-ptm: fix build with kernel 4.9
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
d61a799528
commit
c7ce9908bd
2 changed files with 16 additions and 0 deletions
|
@ -405,7 +405,11 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
/* allocate descriptor */
|
/* allocate descriptor */
|
||||||
desc_base = get_tx_desc(ndev, &f_full);
|
desc_base = get_tx_desc(ndev, &f_full);
|
||||||
if ( f_full ) {
|
if ( f_full ) {
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||||
|
netif_trans_update(dev);
|
||||||
|
#else
|
||||||
dev->trans_start = jiffies;
|
dev->trans_start = jiffies;
|
||||||
|
#endif
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
IFX_REG_W32_MASK(0, 1 << (ndev + 16), MBOX_IGU1_ISRC);
|
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_packets++;
|
||||||
g_ptm_priv_data.itf[ndev].stats.tx_bytes += reg_desc.datalen;
|
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;
|
dev->trans_start = jiffies;
|
||||||
|
#endif
|
||||||
mailbox_signal(ndev, 1);
|
mailbox_signal(ndev, 1);
|
||||||
|
|
||||||
adsl_led_flash();
|
adsl_led_flash();
|
||||||
|
|
|
@ -289,7 +289,11 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
/* allocate descriptor */
|
/* allocate descriptor */
|
||||||
desc_base = get_tx_desc(0, &f_full);
|
desc_base = get_tx_desc(0, &f_full);
|
||||||
if ( f_full ) {
|
if ( f_full ) {
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||||
|
netif_trans_update(dev);
|
||||||
|
#else
|
||||||
dev->trans_start = jiffies;
|
dev->trans_start = jiffies;
|
||||||
|
#endif
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
IFX_REG_W32_MASK(0, 1 << 17, MBOX_IGU1_ISRC);
|
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();
|
wmb();
|
||||||
*(volatile unsigned int *)desc = *(unsigned int *)®_desc;
|
*(volatile unsigned int *)desc = *(unsigned int *)®_desc;
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
|
||||||
|
netif_trans_update(dev);
|
||||||
|
#else
|
||||||
dev->trans_start = jiffies;
|
dev->trans_start = jiffies;
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue