[PATCH] nl80211: restore the correct nlmode in case of failed ap scan

Eliad Peller eliad
Thu Jan 15 04:06:38 PST 2015


In case of failed ap scan, we try switching the interface
to station mode and scan again. If this scan fails as well,
we change the interface type to the new interface type,
instead of restoring the original one.

This breaks the ht40 scan retry mechanism (as we finally
try to complete the ap setup with station interface).

Signed-off-by: Eliad Peller <eliad at wizery.com>
---
 src/drivers/driver_nl80211_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index 20518fe..54dc530 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -244,7 +244,7 @@ int wpa_driver_nl80211_scan(struct i802_bss *bss,
 				goto fail;
 
 			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;
 			}
 
-- 
1.8.5.2.229.g4448466.dirty




More information about the Hostap mailing list