[PATCH] wpa_supplicant DBus API: Update active/passive scan logic

Daniel Kurtz djkurtz
Wed Oct 6 12:53:04 PDT 2010


Oops.  Sorry, this patches to the wrong git repo.
Will sync with upstream and resubmit.

On Wed, Oct 6, 2010 at 12:00 PM, Daniel Kurtz <djkurtz at google.com> wrote:

> Currently the DBus Interface.Scan API is counter-intuitive.
> It issues ProbeRequests when doing passive scans when channels are
> specified,
> and does not issue probes for active scan.
>
> This patch updates DBus API Scan logic per the 7 test cases listed below:
>
>  1) Request:     Passive scan (all channels)
>     Should be:   No ProbeRequests; Passive Scan results for all channels
>     Previous:    1 ProbeRequest on all channels for both broadcast SSID and
> selected network (scan_ssid=1)
>     This Patch:  1 ProbeRequest on all channels for both broadcast SSID and
> selected network (scan_ssid=1)
>
>  2) Request:     Passive scan (1 channel)
>     Should be:   No ProbeRequests; Passive Scan results for 1 channel (plus
> overlapping channels)
>     Previous:    1 broadcast ProbeRequest on specified channel
>     This Patch:  --Fixed--: No ProbeRequests; Passive Scan results for 1
> channel (plus overlapping channels)
>
>  3) Request:     Active scan with no SSIDs (all channels)
>     Should be:   1 broadcast ProbeRequest on all channels
>     Previous:    No ProbeRequests;  passive scan results for all channels
>     This Patch:  --Fixed--: 1 broadcast ProbeRequest on all channels
>
>  4) Request:     Active scan with no SSIDs (1 channel)
>     Should be:   1 broadcast ProbeRequest on specified channel (plus
> overlapping channels)
>     Previous:    No ProbeRequests; Passive scan results for specified
> channel (plus overlapping channels)
>     This Patch:  --Fixed--: 1 broadcast ProbeRequest on specified channel
> (plus overlapping channels)
>
> ---
>  wpa_supplicant/dbus/dbus_new_handlers.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
> b/wpa_supplicant/dbus/dbus_new_handlers.c
> index b9f6a8d..765a158 100644
> --- a/wpa_supplicant/dbus/dbus_new_handlers.c
> +++ b/wpa_supplicant/dbus/dbus_new_handlers.c
> @@ -1278,14 +1278,16 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage
> *message,
>                                "passive scan");
>                        goto out;
>                } else if (params.freqs && params.freqs[0]) {
> -                       /* wildcard ssid */
> -                       params.num_ssids++;
>                        wpa_supplicant_trigger_scan(wpa_s, &params);
>                } else {
>                        wpa_s->scan_req = 2;
>                        wpa_supplicant_req_scan(wpa_s, 0, 0);
>                }
>        } else if (!os_strcmp(type, "active")) {
> +               if (!params.num_ssids) {
> +                       /* Add wildcard ssid */
> +                       params.num_ssids++;
> +               }
>                wpa_supplicant_trigger_scan(wpa_s, &params);
>        } else {
>                wpa_printf(MSG_DEBUG, "wpas_dbus_handler_scan[dbus]: "
> --
> 1.7.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20101006/4ee9d2b4/attachment.htm 



More information about the Hostap mailing list