summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-04 18:18:24 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-04 18:18:24 +0100
commit94fca351c2cd0a75ea6b71462a084dc8ffe2e78d (patch)
treee18ef5c26ce50f625ae23ca8ab37f39a9c9c257b /plugins/wifi.c
parent0890f0dcc8c42b4d2de01e42a577fb570b29b6a9 (diff)
downloadconnman-94fca351c2cd0a75ea6b71462a084dc8ffe2e78d.tar.gz
connman-94fca351c2cd0a75ea6b71462a084dc8ffe2e78d.tar.bz2
connman-94fca351c2cd0a75ea6b71462a084dc8ffe2e78d.zip
Add callbacks to supplicant driver
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r--plugins/wifi.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 454c6a0f..6c3efde6 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -171,7 +171,7 @@ static gboolean inactive_scan(gpointer user_data)
DBG("device %p", device);
- __supplicant_scan(device);
+ supplicant_scan(device);
data->inactive_timer = 0;
@@ -397,12 +397,6 @@ done:
g_free(temp);
}
-static struct supplicant_callback wifi_callback = {
- .state_change = state_change,
- .clear_results = clear_results,
- .scan_result = scan_result,
-};
-
static int wifi_probe(struct connman_device *device)
{
struct wifi_data *data;
@@ -438,13 +432,13 @@ static int wifi_enable(struct connman_device *device)
DBG("device %p", device);
- err = __supplicant_start(device, &wifi_callback);
+ err = supplicant_start(device);
if (err < 0)
return err;
connman_device_set_powered(device, TRUE);
- __supplicant_scan(device);
+ supplicant_scan(device);
return 0;
}
@@ -480,7 +474,7 @@ static int wifi_disable(struct connman_device *device)
connman_element_unregister_children((struct connman_element *) device);
- __supplicant_stop(device);
+ supplicant_stop(device);
connman_device_set_powered(device, FALSE);
@@ -491,7 +485,7 @@ static int wifi_scan(struct connman_device *device)
{
DBG("device %p", device);
- __supplicant_scan(device);
+ supplicant_scan(device);
return 0;
}
@@ -525,6 +519,10 @@ static struct supplicant_driver supplicant = {
.name = "wifi",
.probe = wifi_register,
.remove = wifi_unregister,
+
+ .state_change = state_change,
+ .clear_results = clear_results,
+ .scan_result = scan_result,
};
static int wifi_init(void)