diff options
author | Mohamed Abbas <mohamed.abbas@intel.com> | 2011-09-13 09:55:14 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-09-13 10:53:33 +0200 |
commit | ff76ad35726a05cd5bf66ab09c2681f3bee8912d (patch) | |
tree | f9c9622cadc47fa832a390dcdb3596d074d1b0f0 /plugins | |
parent | f5af5715d88a0525e6bc6323d196bd78680e67d1 (diff) | |
download | connman-ff76ad35726a05cd5bf66ab09c2681f3bee8912d.tar.gz connman-ff76ad35726a05cd5bf66ab09c2681f3bee8912d.tar.bz2 connman-ff76ad35726a05cd5bf66ab09c2681f3bee8912d.zip |
wifi: Add support to multi scan type
Allow multi scan type for fast connect.
Scanning request removed from interface_added() because it is already
called in connman_device_set_powered() so no need to call it again
immediately (fix by Jukka Rissanen <jukka.rissanen@linux.intel.com>)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wifi.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 7ab38c54..c392991e 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -303,6 +303,24 @@ static int wifi_scan(struct connman_device *device) return ret; } +static int wifi_scan_fast(struct connman_device *device) +{ + struct wifi_data *wifi = connman_device_get_data(device); + int ret; + + DBG("device %p %p", device, wifi->interface); + + if (wifi->tethering == TRUE) + return 0; + + ret = g_supplicant_interface_scan(wifi->interface, scan_callback, + device); + if (ret == 0) + connman_device_set_scanning(device, TRUE); + + return ret; +} + static struct connman_device_driver wifi_ng_driver = { .name = "wifi", .type = CONNMAN_DEVICE_TYPE_WIFI, @@ -312,6 +330,7 @@ static struct connman_device_driver wifi_ng_driver = { .enable = wifi_enable, .disable = wifi_disable, .scan = wifi_scan, + .scan_fast = wifi_scan_fast, }; static void system_ready(void) @@ -578,8 +597,6 @@ static void interface_added(GSupplicantInterface *interface) if (wifi->tethering == TRUE) return; - - wifi_scan(wifi->device); } static connman_bool_t is_idle(struct wifi_data *wifi) |