static int telit_disable(struct ofono_modem *modem) { struct telit_data *data = ofono_modem_get_data(modem); DBG("%p", modem); g_at_chat_cancel_all(data->modem); g_at_chat_unregister_all(data->modem); g_at_chat_unref(data->modem); data->modem = NULL; g_at_chat_cancel_all(data->chat); g_at_chat_unregister_all(data->chat); /* Power down modem */ g_at_chat_send(data->chat, "AT+CFUN=0", none_prefix, cfun_disable_cb, modem, NULL); return -EINPROGRESS; }
static int sierra_disable(struct ofono_modem *modem) { struct sierra_data *data = ofono_modem_get_data(modem); DBG("%p", modem); g_at_chat_cancel_all(data->modem); g_at_chat_unregister_all(data->modem); g_at_chat_send(data->modem, "AT+CFUN=0", none_prefix, cfun_disable, modem, NULL); return -EINPROGRESS; }
static int ifx_disable(struct ofono_modem *modem) { struct ifx_data *data = ofono_modem_get_data(modem); int i; DBG("%p", modem); for (i = 0; i < NUM_DLC; i++) { g_at_chat_cancel_all(data->dlcs[i]); g_at_chat_unregister_all(data->dlcs[i]); } g_at_chat_send(data->dlcs[AUX_DLC], "AT+CFUN=0", NULL, cfun_disable, modem, NULL); return -EINPROGRESS; }