diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-11 19:48:45 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-11-12 11:24:42 +0100 |
commit | bf3158b62075b39ffe3f450668d3916dcd396e64 (patch) | |
tree | 71cf0043661f0a1905279e0e04329da7616d9613 /package/kernel/mac80211/patches | |
parent | a0be58576cfc25f93f10aabf45908f6056d9f848 (diff) | |
download | upstream-bf3158b62075b39ffe3f450668d3916dcd396e64.tar.gz upstream-bf3158b62075b39ffe3f450668d3916dcd396e64.tar.bz2 upstream-bf3158b62075b39ffe3f450668d3916dcd396e64.zip |
mac80211: backport the new tasklet API
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch b/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch new file mode 100644 index 0000000000..486d10ea58 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch @@ -0,0 +1,35 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Wed, 11 Nov 2020 13:34:26 +0100 +Subject: [PATCH] backports: backport tasklet_setup, from_tasklet + +Backport the new tasklet API + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/backport-include/linux/interrupt.h ++++ b/backport-include/linux/interrupt.h +@@ -31,6 +31,23 @@ static inline void backport_hrtimer_star + hrtimer_start(timer, _time, mode); + } + #define hrtimer_start LINUX_BACKPORT(hrtimer_start) ++ ++#endif ++ ++#if LINUX_VERSION_IS_LESS(5,9,0) ++ ++static inline void ++tasklet_setup(struct tasklet_struct *t, ++ void (*callback)(struct tasklet_struct *)) ++{ ++ void (*cb)(unsigned long data) = (void *)callback; ++ ++ tasklet_init(t, cb, (unsigned long)t); ++} ++ ++#define from_tasklet(var, callback_tasklet, tasklet_fieldname) \ ++ container_of(callback_tasklet, typeof(*var), tasklet_fieldname) ++ + #endif + + #endif /* _BP_LINUX_INTERRUPT_H */ |