diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2019-12-17 16:15:37 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-18 15:56:31 +0100 |
commit | 3827e33d371ed2f4024fd42a4409e1b7af8e0938 (patch) | |
tree | 32f88a8504c8cea69a4e033d1689384b5de242b6 /drivers/staging/wfx/scan.h | |
parent | staging: wfx: rewrite wfx_hw_scan() (diff) | |
download | linux-dev-3827e33d371ed2f4024fd42a4409e1b7af8e0938.tar.xz linux-dev-3827e33d371ed2f4024fd42a4409e1b7af8e0938.zip |
staging: wfx: workaround bug with "iw scan"
mac80211 specification does not forbid hw_scan() to call
ieee80211_scan_completed(). However, from userspace point of view, not
all applications support this behavior. In particular, the code of iw
contains a big fat warning:
/*
* This code has a bug, which requires creating a separate
* nl80211 socket to fix:
* It is possible for a NL80211_CMD_NEW_SCAN_RESULTS or
* NL80211_CMD_SCAN_ABORTED message to be sent by the kernel
* before (!) we listen to it, because we only start listening
* after we send our scan request.
[...]
* Alas, the kernel doesn't do that (yet).
*/
So, we have to avoid to call ieee80211_scan_completed() from hw_scan()
(it's a kind of unwritten rule).
This patch relocates the hw_scan() process to a work_struct to fix the
problem.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-52-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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h index 03bc6c7e562d..b547f1927d72 100644 --- a/drivers/staging/wfx/scan.h +++ b/drivers/staging/wfx/scan.h @@ -15,6 +15,7 @@ struct wfx_dev; struct wfx_vif; +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_scan_complete(struct wfx_vif *wvif, |