From 804c541446ab8e3fab11dba5d8fe07807af7fac5 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Sun, 27 Dec 2020 19:42:24 +0100 Subject: ltq-atm/ltq-ptm: add kernel 5.10 compatiblity The callback handling of the tasklet API was redesigned and the macros using the old syntax renamed to _OLD. The stuck queue is now passed to ndo_tx_timeout callback but not used so far. Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c') 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 44d805049b..d751680853 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *); static int ptm_napi_poll(struct napi_struct *, int); static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *); static int ptm_ioctl(struct net_device *, struct ifreq *, int); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *); +#else +static void ptm_tx_timeout(struct net_device *, unsigned int txqueue); +#endif static inline struct sk_buff* alloc_skb_rx(void); static inline struct sk_buff* alloc_skb_tx(unsigned int); @@ -125,7 +129,11 @@ static char *g_net_dev_name[1] = {"dsl0"}; static int g_ptm_prio_queue_map[8]; +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0); +#else +static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet); +#endif unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR; @@ -451,7 +459,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *dev) +#else +static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue) +#endif { ASSERT(dev == g_net_dev[0], "incorrect device"); -- cgit v1.2.3