summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-03-01 08:13:01 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-03-01 08:13:01 +0100
commit58f36e8b742afc500d5a2330999f51afe8ac0877 (patch)
tree975cd4a61eed95a405cfceb62a0154cbff437d0a
parent7b4a94fd76ef38acecb278536eea9ad57de6dc08 (diff)
downloadconnman-58f36e8b742afc500d5a2330999f51afe8ac0877.tar.gz
connman-58f36e8b742afc500d5a2330999f51afe8ac0877.tar.bz2
connman-58f36e8b742afc500d5a2330999f51afe8ac0877.zip
Implement start and stop callbacks for 802.11
-rw-r--r--plugins/80211.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/plugins/80211.c b/plugins/80211.c
index f71cd6a9..963fb02e 100644
--- a/plugins/80211.c
+++ b/plugins/80211.c
@@ -248,6 +248,28 @@ static void wifi_remove(struct connman_iface *iface)
free(data);
}
+static int wifi_start(struct connman_iface *iface)
+{
+ struct iface_data *data = connman_iface_get_data(iface);
+
+ DBG("iface %p %s", iface, data->ifname);
+
+ __supplicant_start(iface);
+
+ return 0;
+}
+
+static int wifi_stop(struct connman_iface *iface)
+{
+ struct iface_data *data = connman_iface_get_data(iface);
+
+ DBG("iface %p %s", iface, data->ifname);
+
+ __supplicant_stop(iface);
+
+ return 0;
+}
+
static int wifi_scan(struct connman_iface *iface)
{
struct iface_data *data = connman_iface_get_data(iface);
@@ -290,8 +312,6 @@ static int wifi_connect(struct connman_iface *iface,
DBG("iface %p %s", iface, data->ifname);
- __supplicant_start(iface);
-
if (data->network != NULL)
__supplicant_connect(iface, data->network, data->passphrase);
@@ -307,8 +327,6 @@ static int wifi_disconnect(struct connman_iface *iface)
if (data->network != NULL)
__supplicant_disconnect(iface);
- __supplicant_stop(iface);
-
return 0;
}
@@ -561,6 +579,8 @@ static struct connman_iface_driver wifi_driver = {
.capability = "net.80211",
.probe = wifi_probe,
.remove = wifi_remove,
+ .start = wifi_start,
+ .stop = wifi_stop,
.scan = wifi_scan,
.connect = wifi_connect,
.disconnect = wifi_disconnect,