Lines Matching full:w
58 mt76_worker_setup(struct ieee80211_hw *hw, struct mt76_worker *w, in mt76_worker_setup() argument
66 w->fn = fn; in mt76_worker_setup()
67 w->task = kthread_run(__mt76_worker_fn, w, in mt76_worker_setup()
70 if (IS_ERR(w->task)) { in mt76_worker_setup()
71 ret = PTR_ERR(w->task); in mt76_worker_setup()
72 w->task = NULL; in mt76_worker_setup()
79 static inline void mt76_worker_schedule(struct mt76_worker *w) in mt76_worker_schedule() argument
81 if (!w->task) in mt76_worker_schedule()
84 if (!test_and_set_bit(MT76_WORKER_SCHEDULED, &w->state) && in mt76_worker_schedule()
85 !test_bit(MT76_WORKER_RUNNING, &w->state)) in mt76_worker_schedule()
86 wake_up_process(w->task); in mt76_worker_schedule()
89 static inline void mt76_worker_disable(struct mt76_worker *w) in mt76_worker_disable() argument
91 if (!w->task) in mt76_worker_disable()
94 kthread_park(w->task); in mt76_worker_disable()
95 WRITE_ONCE(w->state, 0); in mt76_worker_disable()
98 static inline void mt76_worker_enable(struct mt76_worker *w) in mt76_worker_enable() argument
100 if (!w->task) in mt76_worker_enable()
103 kthread_unpark(w->task); in mt76_worker_enable()
104 mt76_worker_schedule(w); in mt76_worker_enable()
107 static inline void mt76_worker_teardown(struct mt76_worker *w) in mt76_worker_teardown() argument
109 if (!w->task) in mt76_worker_teardown()
112 kthread_stop(w->task); in mt76_worker_teardown()
113 w->task = NULL; in mt76_worker_teardown()