Skip to content
Commit 3827e33d authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

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: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-52-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1c015b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment