Re: [PATCH v3 ath-current] wifi: ath12k: convert scan timeout to wiphy delayed work
From: Runyu Xiao
Date: Sat Sep 12 2026 - 04:13:16 EST
On Fri, Sep 11, 2026 at 01:36:47PM -0700, Jeff Johnson wrote:
> You never responded to my response. However, since this seems to be a
> legitimate issue I did a little more research and now see why the
> finish_queued flag is needed. A better commit text should explain that since
> the current commit text is confusing
Sorry for the delay. I was unsure how this part should be resolved, so I
held off on replying.
> There is, however, one additional issue with the scan complete path.
> wiphy_delayed_work_cancel() requires the wiphy mutex, but
> __ath12k_mac_scan_finish() is called from WMI event handlers under
> data_lock only, without the wiphy mutex. The existing code can call
> cancel_delayed_work() there directly, but that is no longer valid when
> using wiphy_delayed_work. Instead, set a finish_queued flag and queue
> vdev_clean_wk, which runs under the wiphy mutex and performs the
> cancel. Add a check in the timeout worker so that if it was already
> queued before finish_queued was set, it exits without aborting a scan
> that is already finishing.
Agreed. Your explanation clarifies why the finish_queued flag is needed.
I will keep the finish_queued logic and update the commit message accordingly
in the next revision.
Thanks for taking another look.