summaryrefslogtreecommitdiffstats
path: root/drivers/ifxmodem
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-19 11:56:45 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-19 11:56:45 +0200
commit19c1b9cbf6049c1b4389573962479b26a98610c9 (patch)
treef5cdb5342ec17b106db5f4a32c40c6c8be9ba14d /drivers/ifxmodem
parentde1d1736ce00a42b291009e10d83bf14f54dd09c (diff)
downloadofono-19c1b9cbf6049c1b4389573962479b26a98610c9.tar.bz2
ifxmodem: Enable SIM Toolkit with AT+CFUN=6
The current Infineon firmware overloads the AT+CFUN command with enabling SIM Toolkit and fetching of proactive commands. It seems to be safe to send this command in offline mode (AT+CFUN=4) and also in online mode (AT+CFUN=1). These are the two cases where SIM Toolkit atom would be initialized.
Diffstat (limited to 'drivers/ifxmodem')
-rw-r--r--drivers/ifxmodem/stk.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ifxmodem/stk.c b/drivers/ifxmodem/stk.c
index 5c331ed0..2066f583 100644
--- a/drivers/ifxmodem/stk.c
+++ b/drivers/ifxmodem/stk.c
@@ -46,7 +46,7 @@ struct stk_data {
static const char *none_prefix[] = { NULL };
static const char *sate_prefix[] = { "+SATE:", NULL };
-static const char *stkprof_prefix[] = { "+STKPROF:", NULL };
+static const char *cfun_prefix[] = { "+CFUN:", NULL };
static void sate_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
@@ -241,7 +241,7 @@ static void satf_notify(GAtResult *result, gpointer user_data)
ofono_stk_proactive_session_end_notify(stk);
}
-static void stkprof_support_cb(gboolean ok, GAtResult *result,
+static void cfun_support_cb(gboolean ok, GAtResult *result,
gpointer user_data)
{
struct ofono_stk *stk = user_data;
@@ -256,11 +256,8 @@ static void stkprof_support_cb(gboolean ok, GAtResult *result,
g_at_chat_register(sd->chat, "+SATN:", satn_notify, FALSE, stk, NULL);
g_at_chat_register(sd->chat, "+SATF:", satf_notify, FALSE, stk, NULL);
- g_at_chat_send(sd->chat, "AT+STKPROF?", stkprof_prefix,
- NULL, NULL, NULL);
-
- g_at_chat_send(sd->chat, "AT+STKPROF=4,\"1F7F\"", none_prefix,
- NULL, NULL, NULL);
+ g_at_chat_send(sd->chat, "AT+CFUN=6", none_prefix,
+ NULL, NULL, NULL);
ofono_stk_register(stk);
}
@@ -280,8 +277,8 @@ static int ifx_stk_probe(struct ofono_stk *stk, unsigned int vendor, void *data)
ofono_stk_set_data(stk, sd);
- g_at_chat_send(sd->chat, "AT+STKPROF=?", stkprof_prefix,
- stkprof_support_cb, stk, NULL);
+ g_at_chat_send(sd->chat, "AT+CFUN=?", cfun_prefix,
+ cfun_support_cb, stk, NULL);
return 0;
}