From: Felix Fietkau Date: Mon, 28 Sep 2020 08:35:28 +0200 Subject: [PATCH] backports: add sched_set_fifo_low It is needed for mt76 Signed-off-by: Felix Fietkau --- create mode 100644 backport/backport-include/linux/sched.h --- /dev/null +++ b/backport-include/linux/sched.h @@ -0,0 +1,19 @@ +#ifndef __BACKPORT_LINUX_SCHED_H +#define __BACKPORT_LINUX_SCHED_H + +#include_next +#include + +#if LINUX_VERSION_IS_LESS(5,9,0) +#include + +static inline void sched_set_fifo_low(struct task_struct *p) +{ + struct sched_param sparam = {.sched_priority = 1}; + + sched_setscheduler(p, SCHED_FIFO, &sparam); +} + +#endif + +#endif