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>
This commit is contained in:
parent
061cbb258f
commit
1fef85c7c5
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ int wpa_driver_nl80211_scan(struct i802_bss *bss,
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (wpa_driver_nl80211_scan(bss, params)) {
|
if (wpa_driver_nl80211_scan(bss, params)) {
|
||||||
wpa_driver_nl80211_set_mode(bss, drv->nlmode);
|
wpa_driver_nl80211_set_mode(bss, old_mode);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue