aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/lantiq/ltq-atm/src/ltq_atm.c')
-rw-r--r--package/kernel/lantiq/ltq-atm/src/ltq_atm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 0b9d7a05ab..a8f787fdca 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -812,7 +812,11 @@ struct sk_buff* atm_alloc_tx(struct atm_vcc *vcc, unsigned int size)
return NULL;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+ refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
+#else
atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
+#endif
return skb;
}