wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_work
authorMartin Kaistra <martin.kaistra@linutronix.de>
Thu, 11 Jan 2024 16:36:27 +0000 (17:36 +0100)
committerKalle Valo <kvalo@kernel.org>
Sun, 14 Jan 2024 19:08:01 +0000 (21:08 +0200)
commit1213acb478a7181cd73eeaf00db430f1e45b1361
tree2460f2abdc8939f1a0673c0a8d7e109f4042374d
parent178cc55d5129556e290cc05e152138037930419f
wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_work

The workqueue might still be running, when the driver is stopped. To
avoid a use-after-free, call cancel_work_sync() in rtl8xxxu_stop().

Fixes: e542e66b7c2e ("rtl8xxxu: add bluetooth co-existence support for single antenna")
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240111163628.320697-2-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c