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

Jouni Malinen j
Thu Jan 15 07:11:13 PST 2015

On Thu, Jan 15, 2015 at 02:06:38PM +0200, Eliad Peller wrote:
> 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).

> diff --git 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,
>  			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;
>  			}

That's a good fix, but couple of hours too late.. :)  I fixed that
earlier today with the same change.
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list