driver_list = g_slist_remove(driver_list, driver);
}
-void __connman_technology_add_interface(enum connman_service_type type,
- int index, const char *name, const char *ident)
-{
- GSList *list;
-
- switch (type) {
- case CONNMAN_SERVICE_TYPE_UNKNOWN:
- case CONNMAN_SERVICE_TYPE_SYSTEM:
- return;
- case CONNMAN_SERVICE_TYPE_ETHERNET:
- case CONNMAN_SERVICE_TYPE_WIFI:
- case CONNMAN_SERVICE_TYPE_WIMAX:
- case CONNMAN_SERVICE_TYPE_BLUETOOTH:
- case CONNMAN_SERVICE_TYPE_CELLULAR:
- case CONNMAN_SERVICE_TYPE_GPS:
- case CONNMAN_SERVICE_TYPE_VPN:
- case CONNMAN_SERVICE_TYPE_GADGET:
- break;
- }
-
- connman_info("Create interface %s [ %s ]", name,
- __connman_service_type2string(type));
-
- for (list = technology_list; list; list = list->next) {
- struct connman_technology *technology = list->data;
-
- if (technology->type != type)
- continue;
-
- if (technology->driver == NULL)
- continue;
-
- if (technology->driver->add_interface)
- technology->driver->add_interface(technology,
- index, name, ident);
- }
-}
-
-void __connman_technology_remove_interface(enum connman_service_type type,
- int index, const char *name, const char *ident)
-{
- GSList *list;
-
- switch (type) {
- case CONNMAN_SERVICE_TYPE_UNKNOWN:
- case CONNMAN_SERVICE_TYPE_SYSTEM:
- return;
- case CONNMAN_SERVICE_TYPE_ETHERNET:
- case CONNMAN_SERVICE_TYPE_WIFI:
- case CONNMAN_SERVICE_TYPE_WIMAX:
- case CONNMAN_SERVICE_TYPE_BLUETOOTH:
- case CONNMAN_SERVICE_TYPE_CELLULAR:
- case CONNMAN_SERVICE_TYPE_GPS:
- case CONNMAN_SERVICE_TYPE_VPN:
- case CONNMAN_SERVICE_TYPE_GADGET:
- break;
- }
-
- connman_info("Remove interface %s [ %s ]", name,
- __connman_service_type2string(type));
-
- for (list = technology_list; list; list = list->next) {
- struct connman_technology *technology = list->data;
-
- if (technology->type != type)
- continue;
-
- if (technology->driver == NULL)
- continue;
-
- if (technology->driver->remove_interface)
- technology->driver->remove_interface(technology, index);
- }
-}
-
static void tethering_changed(struct connman_technology *technology)
{
connman_bool_t tethering = technology->tethering;
g_free(technology);
}
+void __connman_technology_add_interface(enum connman_service_type type,
+ int index, const char *name, const char *ident)
+{
+ GSList *list;
+
+ switch (type) {
+ case CONNMAN_SERVICE_TYPE_UNKNOWN:
+ case CONNMAN_SERVICE_TYPE_SYSTEM:
+ return;
+ case CONNMAN_SERVICE_TYPE_ETHERNET:
+ case CONNMAN_SERVICE_TYPE_WIFI:
+ case CONNMAN_SERVICE_TYPE_WIMAX:
+ case CONNMAN_SERVICE_TYPE_BLUETOOTH:
+ case CONNMAN_SERVICE_TYPE_CELLULAR:
+ case CONNMAN_SERVICE_TYPE_GPS:
+ case CONNMAN_SERVICE_TYPE_VPN:
+ case CONNMAN_SERVICE_TYPE_GADGET:
+ break;
+ }
+
+ connman_info("Create interface %s [ %s ]", name,
+ __connman_service_type2string(type));
+
+ technology_get(type);
+
+ for (list = technology_list; list; list = list->next) {
+ struct connman_technology *technology = list->data;
+
+ if (technology->type != type)
+ continue;
+
+ if (technology->driver == NULL)
+ continue;
+
+ if (technology->driver->add_interface)
+ technology->driver->add_interface(technology,
+ index, name, ident);
+ }
+}
+
+void __connman_technology_remove_interface(enum connman_service_type type,
+ int index, const char *name, const char *ident)
+{
+ GSList *list;
+
+ switch (type) {
+ case CONNMAN_SERVICE_TYPE_UNKNOWN:
+ case CONNMAN_SERVICE_TYPE_SYSTEM:
+ return;
+ case CONNMAN_SERVICE_TYPE_ETHERNET:
+ case CONNMAN_SERVICE_TYPE_WIFI:
+ case CONNMAN_SERVICE_TYPE_WIMAX:
+ case CONNMAN_SERVICE_TYPE_BLUETOOTH:
+ case CONNMAN_SERVICE_TYPE_CELLULAR:
+ case CONNMAN_SERVICE_TYPE_GPS:
+ case CONNMAN_SERVICE_TYPE_VPN:
+ case CONNMAN_SERVICE_TYPE_GADGET:
+ break;
+ }
+
+ connman_info("Remove interface %s [ %s ]", name,
+ __connman_service_type2string(type));
+
+ for (list = technology_list; list; list = list->next) {
+ struct connman_technology *technology = list->data;
+
+ if (technology->type != type)
+ continue;
+
+ if (technology->driver == NULL)
+ continue;
+
+ if (technology->driver->remove_interface)
+ technology->driver->remove_interface(technology, index);
+
+ technology_put(technology);
+ }
+}
+
static void unregister_technology(gpointer data)
{
struct connman_technology *technology = data;