From 543a9964f9b0d8aa5770502f94b545a25a8f7141 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 30 Nov 2010 20:12:34 +0100 Subject: [PATCH] wifi: Register technology driver --- plugins/wifi.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/plugins/wifi.c b/plugins/wifi.c index eacace4..542ab2f 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -632,6 +633,28 @@ static struct connman_network_driver network_driver = { .disconnect = network_disconnect, }; +static int tech_probe(struct connman_technology *technology) +{ + return 0; +} + +static void tech_remove(struct connman_technology *technology) +{ +} + +static int tech_set_regdom(struct connman_technology *technology, const char *alpha2) +{ + return 0; +} + +static struct connman_technology_driver tech_driver = { + .name = "bluetooth", + .type = CONNMAN_SERVICE_TYPE_BLUETOOTH, + .probe = tech_probe, + .remove = tech_remove, + .set_regdom = tech_set_regdom, +}; + static int wifi_init(void) { int err; @@ -646,6 +669,13 @@ static int wifi_init(void) return err; } + err = connman_technology_driver_register(&tech_driver); + if (err < 0) { + g_supplicant_unregister(&callbacks); + connman_network_driver_unregister(&network_driver); + return err; + } + return 0; } @@ -653,6 +683,8 @@ static void wifi_exit(void) { DBG(); + connman_technology_driver_unregister(&tech_driver); + g_supplicant_unregister(&callbacks); connman_network_driver_unregister(&network_driver); -- 2.7.4