int priority;
int (*probe) (struct connman_technology *technology);
void (*remove) (struct connman_technology *technology);
+ int (*set_tethering) (struct connman_technology *technology,
+ connman_bool_t enabled);
};
int connman_technology_driver_register(struct connman_technology_driver *driver);
driver_list = g_slist_remove(driver_list, driver);
}
-int __connman_technology_enable_tethering(void)
+static int set_tethering(connman_bool_t enabled)
{
GSList *list;
if (technology->driver == NULL)
continue;
+
+ if (technology->driver->set_tethering)
+ technology->driver->set_tethering(technology, enabled);
}
return 0;
}
-int __connman_technology_disable_tethering(void)
+int __connman_technology_enable_tethering(void)
{
- GSList *list;
-
- for (list = technology_list; list; list = list->next) {
- struct connman_technology *technology = list->data;
-
- if (technology->driver == NULL)
- continue;
- }
+ return set_tethering(TRUE);
+}
- return 0;
+int __connman_technology_disable_tethering(void)
+{
+ return set_tethering(FALSE);
}
static void free_rfkill(gpointer data)