[PATCH 13/16] WNM: Consolidate the scanning paths for BTM requests
Benjamin Berg
benjamin at sipsolutions.net
Fri Aug 2 03:32:39 PDT 2024
Hi,
just a quick response. The reason the test change is needed is because the test verifies a scan is being done. However, the code has a fast path to not scan if there are recent results available.
Before the change, a scan happened anyway, but that isn't the case anymore making the flush (or sufficiently long sleep) necessary.
But I agree, I should have pointed out in the commit message why the test changes are needes (and why one can argue that it is a fix of the test behavior).
Benjamin
On Friday, 2 August 2024, Jouni Malinen wrote:
> 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