mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
util: in worker setup, only overwrite function pointer if not NULL
Can be used to set up the worker function pointer earlier Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -68,7 +68,8 @@ mt76_worker_setup(struct ieee80211_hw *hw, struct mt76_worker *w,
|
|||||||
const char *dev_name = wiphy_name(hw->wiphy);
|
const char *dev_name = wiphy_name(hw->wiphy);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
w->fn = fn;
|
if (fn)
|
||||||
|
w->fn = fn;
|
||||||
w->task = kthread_create(__mt76_worker_fn, w, "mt76-%s %s",
|
w->task = kthread_create(__mt76_worker_fn, w, "mt76-%s %s",
|
||||||
name, dev_name);
|
name, dev_name);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user