nl80211: do not block when driver aborts scan
authorOlof Sivertsson <olof.sivertsson@zenterio.com>
Wed, 17 Jan 2018 12:32:09 +0000 (13:32 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 17 Jan 2018 12:34:08 +0000 (13:34 +0100)
commitfb749bf51a7855ee955fc221acdc51b94231db2b
tree46fc3e4061e8e6cc85a61888676c91d71a780f98
parent75c572074f272f0b983d888f7dd23ee59719c6b0
nl80211: do not block when driver aborts scan

Drivers may abort a scan by calling cfg80211_scan_done() with a struct
cfg80211_scan_info that sets aborted to true.

To avoid blocking forever consider both NL80211_CMD_NEW_SCAN_RESULTS
and NL80211_CMD_SCAN_ABORTED when waiting for scan results.

Tested with Broadcom's bcmdhd driver.

Signed-off-by: Olof Sivertsson <olof.sivertsson@zenterio.com>
[rebased on top of variadic nl80211_wait()]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
iwinfo_nl80211.c