Oops. Sorry, this patches to the wrong git repo. <div>Will sync with upstream and resubmit.<br><br><div class="gmail_quote">On Wed, Oct 6, 2010 at 12:00 PM, Daniel Kurtz <span dir="ltr"><<a href="mailto:djkurtz@google.com">djkurtz@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Currently the DBus Interface.Scan API is counter-intuitive.<br>
It issues ProbeRequests when doing passive scans when channels are specified,<br>
and does not issue probes for active scan.<br>
<br>
This patch updates DBus API Scan logic per the 7 test cases listed below:<br>
<br>
1) Request: Passive scan (all channels)<br>
Should be: No ProbeRequests; Passive Scan results for all channels<br>
Previous: 1 ProbeRequest on all channels for both broadcast SSID and selected network (scan_ssid=1)<br>
This Patch: 1 ProbeRequest on all channels for both broadcast SSID and selected network (scan_ssid=1)<br>
<br>
2) Request: Passive scan (1 channel)<br>
Should be: No ProbeRequests; Passive Scan results for 1 channel (plus overlapping channels)<br>
Previous: 1 broadcast ProbeRequest on specified channel<br>
This Patch: --Fixed--: No ProbeRequests; Passive Scan results for 1 channel (plus overlapping channels)<br>
<br>
3) Request: Active scan with no SSIDs (all channels)<br>
Should be: 1 broadcast ProbeRequest on all channels<br>
Previous: No ProbeRequests; passive scan results for all channels<br>
This Patch: --Fixed--: 1 broadcast ProbeRequest on all channels<br>
<br>
4) Request: Active scan with no SSIDs (1 channel)<br>
Should be: 1 broadcast ProbeRequest on specified channel (plus overlapping channels)<br>
Previous: No ProbeRequests; Passive scan results for specified channel (plus overlapping channels)<br>
This Patch: --Fixed--: 1 broadcast ProbeRequest on specified channel (plus overlapping channels)<br>
<br>
---<br>
wpa_supplicant/dbus/dbus_new_handlers.c | 6 ++++--<br>
1 files changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c<br>
index b9f6a8d..765a158 100644<br>
--- a/wpa_supplicant/dbus/dbus_new_handlers.c<br>
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c<br>
@@ -1278,14 +1278,16 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,<br>
"passive scan");<br>
goto out;<br>
} else if (params.freqs && params.freqs[0]) {<br>
- /* wildcard ssid */<br>
- params.num_ssids++;<br>
wpa_supplicant_trigger_scan(wpa_s, &params);<br>
} else {<br>
wpa_s->scan_req = 2;<br>
wpa_supplicant_req_scan(wpa_s, 0, 0);<br>
}<br>
} else if (!os_strcmp(type, "active")) {<br>
+ if (!params.num_ssids) {<br>
+ /* Add wildcard ssid */<br>
+ params.num_ssids++;<br>
+ }<br>
wpa_supplicant_trigger_scan(wpa_s, &params);<br>
} else {<br>
wpa_printf(MSG_DEBUG, "wpas_dbus_handler_scan[dbus]: "<br>
<font color="#888888">--<br>
1.7.1<br>
<br>
</font></blockquote></div><br></div>