[PATCH] supplicant: Allow disabling reassoc based on scan results.

Dan Williams dcbw at redhat.com
Sat Mar 26 09:08:55 PDT 2016

On Fri, 2016-03-25 at 14:42 -0700, Ben Greear wrote:
> On 03/25/2016 03:03 AM, Jouni Malinen wrote:
> > 
> > On Tue, Mar 22, 2016 at 07:12:34PM -0400, greearb at candelatech.com
> > wrote:
> > > 
> > > This gives configurable control over whether to consider
> > > roaming based on scan results.  I find this useful when
> > > doing explicit roaming tests, where I do not want scan
> > > requests to cause the roam automatically.
> > Please check if the "SCAN TYPE=ONLY" command that Dan mentions
> > works for
> > your use case. That's already used on Android to do exactly what
> > you
> > describe here as far as I can tell.
> > 
> > If there is other use cases that needs this separate configuration
> > parameter, I might accept it. That said, this would need to be
> > rebased
> > on top of the hostap.git master branch since almost none of this
> > applies
> > as-is. I would also drop the #ifndef CONFIG_NO_ROAMING/#endif lines
> > to
> > keep the source code cleaner. Saving couple of bytes in binary if
> > CONFIG_NO_ROAMING is defined (which is something I would not
> > recommend
> > defining) is not sufficient justification for making the
> > implementation
> > more complex.
> First, I am also running a patch that allows supplicant
> to use external scan results (from iw, for instance), and I would
> want
> it to not roam when using those scan results as well (unless the
> station vdev is *configured* to allow roaming).
> Second, the reason I request a scan before roaming is that the bss
> table needs to be fresh before calling the roam CLI command.
> I tried reading the code, and from what I can tell, the TYPE=ONLY
> thing causes it to not update the bss entries?

When the scan is done the driver sends EVENT_SCAN_RESULTS which
calls wpa_supplicant_event_scan_results() which
calls wpa_supplicant_get_scan_results() which updates the BSS list.
 Only after that point does TYPE=ONLY have an effect, where it
basically just cuts _wpa_supplicant_event_scan_results() short.  Thus
that function never gets to wpas_select_network_from_last_scan().


> So, I think I will want this patch in my tree regardless.
> My test setup for this particular use-case has been reconfigured,
> so I do not have an easy way to test out the TYPE=ONLY
> at this time.
> If you would like the patch upstream, I'll be happy to rebase it
> on top of stock hostapd and remove the #ifdefs as you suggested.
> Thanks,
> Ben

More information about the Hostap mailing list