wpa-supplicant and scan sharing

Otcheretianski, Andrei andrei.otcheretianski at intel.com
Sun Jun 4 08:19:33 PDT 2017


> -----Original Message-----
> From: Ben Greear [mailto:greearb at candelatech.com]
> Sent: Sunday, June 04, 2017 17:33
> To: Otcheretianski, Andrei <andrei.otcheretianski at intel.com>;
> hostap at lists.infradead.org
> Subject: Re: wpa-supplicant and scan sharing
> 
> 
> 
> On 06/04/2017 01:34 AM, Otcheretianski, Andrei wrote:
> >> -----Original Message-----
> >> From: Hostap [mailto:hostap-bounces at lists.infradead.org] On Behalf Of
> >> Ben Greear
> >> Sent: Wednesday, May 31, 2017 00:45
> >> To: hostap at lists.infradead.org
> >> Subject: wpa-supplicant and scan sharing
> >>
> >> [Sorry for previous email with bogus subject.]
> >>
> >> Hello,
> >>
> >> In wpa_supplicant/events.c, there is code similar to this below.
> >>
> >> Is there any reason 'ret = 1' other than some drivers may have issues
> >> with multiple association attempts?  I am pretty sure that I used to
> >> bring up many ath9k and ath10k station vdevs at once, so maybe this
> >> is just for Intel NICs (based on the comitter that changed that code last)?
> >
> > This is the same behavior as it was there before this patch. Previously if scan
> results triggered an operation, other interfaces wouldn't be updated at all.
> > The patch you mention changed it to update scan results on other interfaces,
> but still prevents starting any operation.
> > Anyway, in the "if" you mention wpa_s->scan_res_handler != NULL - so
> > it's not an association flow - the association is happening in
> > wpas_select_network_from_last_scan()
> > I'm not sure what do you mean by "multiple association attempts" - concurrent
> connections on the same radio are serialized using radio_works anyway, and on
> different radios there is no scan results update from sibling.
> > So, here is the flow when you connect multiple interfaces: the first one will
> trigger scan and connect + update the siblings. Other sibling interfaces will
> connect directly without scant through wpa_supplicant_fast_associate().
> 
> In my case, until I relaxed this, all station vdevs would scan before connecting.
> Possibly this is due to other patches I have in my supplicant...but I would be
> curious to see 'iw events' output if you could get multiple station vdevs to
> associate w/out each of them scanning.

Tried it with hwsim and it works for me - second connection is without scan

Something like this:
def test_wpas_multi_sta_connect(dev, apdev):
    """wpa_supplicant connect 2 STA interfaces"""
    hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
    ifname = "test-" + dev[0].ifname
    dev[0].interface_add(ifname, create=True)
    dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
    hwsim_utils.test_connectivity(dev[0], hapd)

    wpas = WpaSupplicant(ifname=ifname)
    wpas.connect("open", key_mgmt="NONE", scan_freq="2412")
    hwsim_utils.test_connectivity(wpas, hapd)
    hwsim_utils.test_connectivity(dev[0], hapd)
    dev[0].global_request("INTERFACE_REMOVE " + ifname)
    hwsim_utils.test_connectivity(dev[0], hapd)

Andrei
> 
> Thanks,
> Ben
> 
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com



More information about the Hostap mailing list