diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-01-04 20:58:07 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-01-04 20:58:07 +0100 |
commit | f419f84ecd0fc2d642befbe1ffb2bfea9607230e (patch) | |
tree | 6107de5fb4546ba8ae619cb5d669da537ebd2961 /plugins/wifi.c | |
parent | 307c129f118759615c60832264b856b8ba63fef7 (diff) | |
download | connman-f419f84ecd0fc2d642befbe1ffb2bfea9607230e.tar.gz connman-f419f84ecd0fc2d642befbe1ffb2bfea9607230e.tar.bz2 connman-f419f84ecd0fc2d642befbe1ffb2bfea9607230e.zip |
Use async creation and removal for supplicant interfaces
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r-- | plugins/wifi.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 6c3efde6..0ae1014f 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -428,19 +428,9 @@ static void wifi_remove(struct connman_device *device) static int wifi_enable(struct connman_device *device) { - int err; - DBG("device %p", device); - err = supplicant_start(device); - if (err < 0) - return err; - - connman_device_set_powered(device, TRUE); - - supplicant_scan(device); - - return 0; + return supplicant_start(device); } static int wifi_disable(struct connman_device *device) @@ -474,20 +464,14 @@ static int wifi_disable(struct connman_device *device) connman_element_unregister_children((struct connman_element *) device); - supplicant_stop(device); - - connman_device_set_powered(device, FALSE); - - return 0; + return supplicant_stop(device); } static int wifi_scan(struct connman_device *device) { DBG("device %p", device); - supplicant_scan(device); - - return 0; + return supplicant_scan(device); } static struct connman_device_driver wifi_driver = { |