mt76: add utility functions for deferring work to a kernel thread
authorFelix Fietkau <nbd@nbd.name>
Fri, 24 Jul 2020 12:43:49 +0000 (14:43 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 24 Sep 2020 16:10:18 +0000 (18:10 +0200)
commit30bdd69246ea9726a7688ef02c60b1ec0ae66d38
tree9b5e8b981a82f67f79ec4bd7fd5f1584b5939cfd
parent9729ff4cc516cb88e47cda0eff4eaf95e73c5a06
mt76: add utility functions for deferring work to a kernel thread

In order to avoid keeping work like tx scheduling pinned to the CPU it was
scheduled from, it makes sense to switch from tasklets to kernel threads.

Unlike a workqueue, this one only allows one fixed worker function to be
executed by the worker thread. Because of that, there is less locking
and less code for scheduling involved.
This is important because the tx worker is scheduled often in a hot path

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/util.c
drivers/net/wireless/mediatek/mt76/util.h