[PATCH 13/16] WNM: Consolidate the scanning paths for BTM requests

Jouni Malinen j at w1.fi
Fri Aug 2 03:26:23 PDT 2024


On Mon, Apr 29, 2024 at 01:51:54PM +0200, benjamin at sipsolutions.net wrote:
> There was an ancient code path to trigger a scan that was apparently
> forgotten when the code was extended over time. It does not make any
> sense to trigger a scan twice, so remove the earlier scan.
> 
> The earlier scan call was avoiding to trigger a new scan if a fixed
> BSSID is configured. This seems like a reasonable restriction to do, so
> add this check before starting a scan.
> 
> Consolidate everything so that scanning happens at the end of the
> functions unless we bail out before. Add a "reset" label for all other
> cases to ensure that we don't leave things in the a bad state.

>  tests/hwsim/test_ap_hs20.py   |   1 +
>  tests/hwsim/test_hapd_ctrl.py |   1 +
>  tests/hwsim/test_wnm.py       |   2 +
>  wpa_supplicant/wnm_sta.c      | 129 +++++++++++++++++++---------------

Those test case changes do not seem to have anything to do with this
commit message, so I'm dropping them from this patch.

> diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
> @@ -2813,6 +2813,7 @@ def _test_ap_hs20_session_info(dev, apdev):
>      interworking_select(dev[0], bssid, freq="2412")
>      interworking_connect(dev[0], bssid, "TTLS")
> +    dev[0].flush_scan_cache()

..

It feels strange to flush the scan results after connection, so if these
are really needed, there needs to be a clear commit message that
describe the reasons.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list