summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2011-12-02 16:18:32 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-12-12 10:44:40 +0100
commit9910e12cb16acf3b9ef5ccd860efcaf23ee92d5d (patch)
tree1e6650b25d5166206b504e42a9aec7e36772aed0 /src
parentbcb3b14998f3e65680560da0cda2170f72aea342 (diff)
downloadconnman-9910e12cb16acf3b9ef5ccd860efcaf23ee92d5d.tar.gz
connman-9910e12cb16acf3b9ef5ccd860efcaf23ee92d5d.tar.bz2
connman-9910e12cb16acf3b9ef5ccd860efcaf23ee92d5d.zip
device: Add function for requesting a hidden scan
Add function for requesting a hidden (WLAN) network scan. Call the hidden scan function is implemented by the device in question.
Diffstat (limited to 'src')
-rw-r--r--src/connman.h3
-rw-r--r--src/device.c17
2 files changed, 20 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index e46fbe22..0d8ef1eb 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -344,6 +344,9 @@ void __connman_device_list(DBusMessageIter *iter, void *user_data);
enum connman_service_type __connman_device_get_service_type(struct connman_device *device);
struct connman_device *__connman_device_find_device(enum connman_service_type type);
int __connman_device_request_scan(enum connman_service_type type);
+int __connman_device_request_hidden_scan(struct connman_device *device,
+ const char *ssid, unsigned int ssid_len,
+ const char *identity, const char *passphrase);
connman_bool_t __connman_device_isfiltered(const char *devname);
diff --git a/src/device.c b/src/device.c
index 29da1a13..6a34d406 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1185,6 +1185,23 @@ int __connman_device_request_scan(enum connman_service_type type)
return 0;
}
+int __connman_device_request_hidden_scan(struct connman_device *device,
+ const char *ssid, unsigned int ssid_len,
+ const char *identity, const char *passphrase)
+{
+ DBG("device %p", device);
+
+ if (device == NULL || device->driver == NULL ||
+ device->driver->scan_hidden == NULL)
+ return -EINVAL;
+
+ if (device->scanning == TRUE)
+ return -EALREADY;
+
+ return device->driver->scan_hidden(device, ssid, ssid_len,
+ identity, passphrase);
+}
+
connman_bool_t __connman_device_isfiltered(const char *devname)
{
char **pattern;