gsupplicant: Return zero for max scan SSID parameter
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 14 Feb 2013 21:37:23 +0000 (23:37 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 18 Feb 2013 08:49:32 +0000 (10:49 +0200)
commit6af0579c434058536fb40480f40f5e9895cfe863
tree0d666deecef262f3914faca3229ce368463e575e
parentab100ee868f8550ccd63893be2eb622c400bbfe2
gsupplicant: Return zero for max scan SSID parameter

A driver can return a valid max scan SSID value of zero. Thus no fast
scans can be done, so the code falls back to a simple scan instead.

A value of zero is properly handled in plugins/wifi.c. An active scan
for a hidden SSID adds only the SSID parameter to the wpa_supplicant
D-Bus method call, which wpa_supplicant then handles properly.

Some drivers also report a max scan SSID value of one. In some of the
cases that value is bogus, the driver will not be able to do a fast
scan anyway. In addition, it is questionable why only one SSID can be
fast scanned as the feature would not differ much from an active scan
for a hidden network. Thus we set the limit to two, i.e. zero or one
is treated as zero, two or more is reported as is.

Thanks to Grant Erickson and Tomasz Bursztyka for finding and
pinpointing this issue.

Fixes BMC#25971
gsupplicant/supplicant.c