diff options
| author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2023-10-04 19:28:41 +0200 |
|---|---|---|
| committer | Kalle Valo <kvalo@kernel.org> | 2023-10-09 09:53:07 +0300 |
| commit | 04106ec5bb025f275d0e18553c253adf12a0cc8a (patch) | |
| tree | 30f3f99662e2a1713d8c54dd342c9d9ab1e98d91 /drivers/net/wireless/silabs/wfx/scan.c | |
| parent | f091bcb62dc6d38ba7c024f083b78e3907a4f079 (diff) | |
wifi: wfx: scan_lock is global to the device
Currently, one scan_lock is associated to each vif. However, concurrent
scan on vifs is explicitly prohibited by the device. Currently,
scan_lock is associated with a vif but it is always locked with
conf_mutex (there is a case where conf_mutex is not associated to
scan_lock but scan_lock is tested on all interfaces). So concurrent scan
on vifs cannot happen.
So, this patch relocate scan_lock to the device and simplify the code.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231004172843.195332-7-jerome.pouiller@silabs.com
Diffstat (limited to 'drivers/net/wireless/silabs/wfx/scan.c')
| -rw-r--r-- | drivers/net/wireless/silabs/wfx/scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/silabs/wfx/scan.c b/drivers/net/wireless/silabs/wfx/scan.c index 16f619ed22e0..d6f98035f684 100644 --- a/drivers/net/wireless/silabs/wfx/scan.c +++ b/drivers/net/wireless/silabs/wfx/scan.c @@ -95,7 +95,7 @@ void wfx_hw_scan_work(struct work_struct *work) int chan_cur, ret, err; mutex_lock(&wvif->wdev->conf_mutex); - mutex_lock(&wvif->scan_lock); + mutex_lock(&wvif->wdev->scan_lock); if (wvif->join_in_progress) { dev_info(wvif->wdev->dev, "abort in-progress REQ_JOIN"); wfx_reset(wvif); @@ -116,7 +116,7 @@ void wfx_hw_scan_work(struct work_struct *work) ret = -ETIMEDOUT; } } while (ret >= 0 && chan_cur < hw_req->req.n_channels); - mutex_unlock(&wvif->scan_lock); + mutex_unlock(&wvif->wdev->scan_lock); mutex_unlock(&wvif->wdev->conf_mutex); wfx_ieee80211_scan_completed_compat(wvif->wdev->hw, ret < 0); } |