summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-08-21 13:38:04 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-08-23 14:19:14 +0300
commit3a8be9689f01e359a3325b1a9afbfb653883aed1 (patch)
tree20f6837405f9b5bd65ef0b1331b34f7e181619e1 /src
parent7e151a7520740b586fe4f2adad1aa21864ef5321 (diff)
downloadconnman-3a8be9689f01e359a3325b1a9afbfb653883aed1.tar.gz
connman-3a8be9689f01e359a3325b1a9afbfb653883aed1.tar.bz2
connman-3a8be9689f01e359a3325b1a9afbfb653883aed1.zip
device: Refactor device scan function
In wifi plugin this means that we combine three wifi scan functions (normal, fast, hidden) into one scan function.
Diffstat (limited to 'src')
-rw-r--r--src/device.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/device.c b/src/device.c
index 13c2c5d0..f0f78914 100644
--- a/src/device.c
+++ b/src/device.c
@@ -589,10 +589,8 @@ int connman_device_set_powered(struct connman_device *device,
connman_device_set_disconnected(device, FALSE);
device->scanning = FALSE;
- if (device->driver && device->driver->scan_fast)
- device->driver->scan_fast(device);
- else if (device->driver && device->driver->scan)
- device->driver->scan(device);
+ if (device->driver && device->driver->scan)
+ device->driver->scan(device, NULL, 0, NULL, NULL, NULL);
return 0;
}
@@ -605,7 +603,7 @@ static int device_scan(struct connman_device *device)
if (device->powered == FALSE)
return -ENOLINK;
- return device->driver->scan(device);
+ return device->driver->scan(device, NULL, 0, NULL, NULL, NULL);
}
int __connman_device_disconnect(struct connman_device *device)
@@ -1118,13 +1116,13 @@ int __connman_device_request_hidden_scan(struct connman_device *device,
DBG("device %p", device);
if (device == NULL || device->driver == NULL ||
- device->driver->scan_hidden == NULL)
+ device->driver->scan == NULL)
return -EINVAL;
if (device->scanning == TRUE)
return -EALREADY;
- return device->driver->scan_hidden(device, ssid, ssid_len,
+ return device->driver->scan(device, ssid, ssid_len,
identity, passphrase, user_data);
}