nl80211: Fix AP-scan-in-STA-mode error path behavior
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 14 Jan 2015 22:59:14 +0000 (00:59 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 14 Jan 2015 22:59:14 +0000 (00:59 +0200)
commit1fef85c7c5e3d484ff8c6ec92c7e883427ec0c7e
treece77244f58bb8555b2d67d346894342e030875ed
parent061cbb258fced68b127f66bdd35c55f77928b720
nl80211: Fix AP-scan-in-STA-mode error path behavior

If a second scan trigger attempt fails in STA mode, the error path was
supposed to restore the old mode that was in use before changing to STA
mode. However, wpa_driver_nl80211_set_mode() changes drv->nlmode on
success, so the recovery path needs to use the saved old_mode value
instead.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211_scan.c