static int technology_disabled(struct connman_technology *technology) { __sync_synchronize(); if (technology->enabled == FALSE) return -EALREADY; technology->enabled = FALSE; powered_changed(technology); return 0; }
static int technology_enabled(struct connman_technology *technology) { DBG(""); __sync_synchronize(); if (technology->enabled == TRUE) return -EALREADY; technology->enabled = TRUE; if (technology->tethering_persistent == TRUE) enable_tethering(technology); powered_changed(technology); return 0; }