[PATCH] wpa_supplicant: Allow vifs to scan only current channel.

Ben Greear greearb
Tue Apr 30 17:32:12 PDT 2013


On 04/30/2013 05:16 PM, greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> If a VIF is already associated, then only scan on the associated
> frequency if user requests such.  This is a big help when using
> lots of virtual stations.

While testing this patch, I found something a bit strange.  Either my patch is
weird, or something else in supplicant might need some attention.

I had 8 stations associated, and then changed the AP's freq.  I quickly
saw 'iw' events showing that all of the stations disconnected:

...
2013-04-30 17:08:41.520  1.3:  sta5 (phy #0): disconnected (local request)
2013-04-30 17:08:41.520  1.3:  sta6: del station 80:01:02:03:04:05
2013-04-30 17:08:41.520  1.3:  sta6 (phy #0): deauth 00:ab:cd:ef:01:07 -> 80:01:02:03:04:05 reason 4: Disassociated due to inactivity
2013-04-30 17:08:41.520  1.3:  sta6 (phy #0): disconnected (local request)
2013-04-30 17:08:41.520  1.3:  sta7: del station 80:01:02:03:04:05
2013-04-30 17:08:41.521  1.3:  sta7 (phy #0): deauth 00:ab:cd:ef:01:08 -> 80:01:02:03:04:05 reason 4: Disassociated due to inactivity
2013-04-30 17:08:41.521  1.3:  sta7 (phy #0): disconnected (local request)

Then, supplicant started scanning again (with the scan_cur_freq=1 setting).
But, it is scanning on the 'current' operating channel, when actually there
should be no current channel.

2013-04-30 17:09:47.268  1.3:  sta6 (phy #0): scan started
2013-04-30 17:09:47.268  1.3:  sta6 (phy #0): scan finished: 2412, ""
2013-04-30 17:09:52.254  1.3:  wlan0 (phy #0): scan started
2013-04-30 17:09:52.293  1.3:  wlan0 (phy #0): scan finished: 2412, ""
2013-04-30 17:10:02.060  1.3:  sta1 (phy #0): scan started
2013-04-30 17:10:07.143  1.3:  sta1 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 5180 5200 5220 5240 5260 5280 5300 5320 5500 
5520 5540 5560 5580 5660 5680 5700 5745 5765 5785 5805 5825, ""
2013-04-30 17:10:07.143  1.3:  sta1: new station 80:01:02:03:04:05
2013-04-30 17:10:07.143  1.3:  sta1 (phy #0): auth 80:01:02:03:04:05 -> 00:ab:cd:ef:01:02 status: 0: Successful
2013-04-30 17:10:07.143  1.3:  sta0 (phy #0): scan started
2013-04-30 17:10:07.443  1.3:  sta0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 5180 5200 5220 5240 5260 5280 5300 5320 5500 
5520 5540 5560 5580 5660 5680 5700 5745 5765 5785 5805 5825, ""
2013-04-30 17:10:07.481  1.1:  vap0: new station 00:ab:cd:ef:01:02
2013-04-30 17:10:07.510  1.3:  sta0: new station 80:01:02:03:04:05
...
2013-04-30 17:10:11.335  1.3:  sta1 (phy #0): assoc 80:01:02:03:04:05 -> 00:ab:cd:ef:01:02 status: 0: Successful
2013-04-30 17:10:11.336  1.3:  sta1 (phy #0): connected to 80:01:02:03:04:05
2013-04-30 17:10:11.336  1.3:  sta0 (phy #0): assoc 80:01:02:03:04:05 -> 00:ab:cd:ef:01:01 status: 0: Successful
2013-04-30 17:10:11.336  1.3:  sta3 (phy #0): scan started
2013-04-30 17:10:11.336  1.3:  sta3 (phy #0): scan finished: 5180, ""

Maybe 5-10 seconds later it scanned everything and re-associated on a new channel.
I'm not 100% sure if my program kicked it or supplicant figured it out on it's own.

Do I need to add some additional event handling so supplicant notices sooner that
stations have disconnected?  Or maybe there were some saved scan list that had to
be used up or time out first?

Thanks,
Ben

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




More information about the Hostap mailing list