mirror of git://git.sysmocom.de/ofono
ifx: Remove modem selftest support
Commands used for self tests are not working for all versions of the modem firmware.
This commit is contained in:
parent
f07ad65af4
commit
f2b8e0f5b9
|
@ -524,7 +524,7 @@ static gboolean mux_timeout_cb(gpointer user_data)
|
||||||
struct ofono_modem *modem = user_data;
|
struct ofono_modem *modem = user_data;
|
||||||
struct ifx_data *data = ofono_modem_get_data(modem);
|
struct ifx_data *data = ofono_modem_get_data(modem);
|
||||||
|
|
||||||
ofono_error("Timeout with modem or multiplexer setup");
|
ofono_error("Timeout with multiplexer setup");
|
||||||
|
|
||||||
data->mux_init_timeout = 0;
|
data->mux_init_timeout = 0;
|
||||||
|
|
||||||
|
@ -539,56 +539,6 @@ static gboolean mux_timeout_cb(gpointer user_data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dev_ver_selftest_cb(gboolean ok, GAtResult *result,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
struct ofono_modem *modem = user_data;
|
|
||||||
struct ifx_data *data = ofono_modem_get_data(modem);
|
|
||||||
|
|
||||||
if (ok)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ofono_error("at@vers:device_version_id()-FAILED");
|
|
||||||
|
|
||||||
if (data->mux_init_timeout > 0) {
|
|
||||||
g_source_remove(data->mux_init_timeout);
|
|
||||||
data->mux_init_timeout = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_at_chat_unref(data->dlcs[AUX_DLC]);
|
|
||||||
data->dlcs[AUX_DLC] = NULL;
|
|
||||||
|
|
||||||
g_io_channel_unref(data->device);
|
|
||||||
data->device = NULL;
|
|
||||||
|
|
||||||
ofono_modem_set_powered(modem, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rtc_gti_selftest_cb(gboolean ok, GAtResult *result,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
struct ofono_modem *modem = user_data;
|
|
||||||
struct ifx_data *data = ofono_modem_get_data(modem);
|
|
||||||
|
|
||||||
if (ok)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ofono_error("at@rtc_drv:rtc_gti_test_verify_32khz()-FAILED");
|
|
||||||
|
|
||||||
if (data->mux_init_timeout > 0) {
|
|
||||||
g_source_remove(data->mux_init_timeout);
|
|
||||||
data->mux_init_timeout = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_at_chat_unref(data->dlcs[AUX_DLC]);
|
|
||||||
data->dlcs[AUX_DLC] = NULL;
|
|
||||||
|
|
||||||
g_io_channel_unref(data->device);
|
|
||||||
data->device = NULL;
|
|
||||||
|
|
||||||
ofono_modem_set_powered(modem, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ifx_enable(struct ofono_modem *modem)
|
static int ifx_enable(struct ofono_modem *modem)
|
||||||
{
|
{
|
||||||
struct ifx_data *data = ofono_modem_get_data(modem);
|
struct ifx_data *data = ofono_modem_get_data(modem);
|
||||||
|
@ -642,24 +592,13 @@ static int ifx_enable(struct ofono_modem *modem)
|
||||||
g_at_chat_send(chat, "ATE0 +CMEE=1", NULL,
|
g_at_chat_send(chat, "ATE0 +CMEE=1", NULL,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
/* Execute modem self tests */
|
|
||||||
g_at_chat_send(chat, "at@rtc_drv:rtc_gti_test_verify_32khz()", NULL,
|
|
||||||
rtc_gti_selftest_cb, modem, NULL);
|
|
||||||
|
|
||||||
g_at_chat_send(chat, "at@vers:device_version_id()", NULL,
|
|
||||||
dev_ver_selftest_cb, modem, NULL);
|
|
||||||
|
|
||||||
/* Enable multiplexer */
|
/* Enable multiplexer */
|
||||||
data->frame_size = 1509;
|
data->frame_size = 1509;
|
||||||
|
|
||||||
g_at_chat_send(chat, "AT+CMUX=0,0,,1509,10,3,30,,", NULL,
|
g_at_chat_send(chat, "AT+CMUX=0,0,,1509,10,3,30,,", NULL,
|
||||||
mux_setup_cb, modem, NULL);
|
mux_setup_cb, modem, NULL);
|
||||||
|
|
||||||
/*
|
data->mux_init_timeout = g_timeout_add_seconds(5, mux_timeout_cb,
|
||||||
* Total self test execution time is around 2 seconds. Use
|
|
||||||
* 10 seconds timeout to cover self tests and multiplexer setup.
|
|
||||||
*/
|
|
||||||
data->mux_init_timeout = g_timeout_add_seconds(10, mux_timeout_cb,
|
|
||||||
modem);
|
modem);
|
||||||
|
|
||||||
data->dlcs[AUX_DLC] = chat;
|
data->dlcs[AUX_DLC] = chat;
|
||||||
|
|
Loading…
Reference in New Issue