diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2021-09-13 15:01:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-14 09:16:31 +0200 |
commit | 8bce06b06b807468f36631f1fe17cbc336debde7 (patch) | |
tree | 305179b22a08b5855d9c4b1e944897c9f2bbb302 /drivers/staging/wfx/scan.h | |
parent | staging: wfx: wait for SCAN_CMPL after a SCAN_STOP (diff) | |
download | linux-dev-8bce06b06b807468f36631f1fe17cbc336debde7.tar.xz linux-dev-8bce06b06b807468f36631f1fe17cbc336debde7.zip |
staging: wfx: avoid possible lock-up during scan
If the environment is noisy, the device may take time to send scan
requests. Thus, scan requests durations > 5s have already been observed.
During the scan, traffic is neither received, neither sent. From the
user point-of-view, the traffic is frozen for a long time.
This patch reworks the scan processing. It gives to the device a smaller
time budget than previously. However, it does not expect the scan to be
complete and it is able to send another scan request to finish the work.
A big part of the patch aims to avoid an infinite loop if the device
goes crazy.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-6-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/scan.h')
-rw-r--r-- | drivers/staging/wfx/scan.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h index c7496a766478..562ca1321daf 100644 --- a/drivers/staging/wfx/scan.h +++ b/drivers/staging/wfx/scan.h @@ -17,6 +17,6 @@ void wfx_hw_scan_work(struct work_struct *work); int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_scan_request *req); void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif); -void wfx_scan_complete(struct wfx_vif *wvif); +void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done); #endif /* WFX_SCAN_H */ |