diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-08-20 20:57:30 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-08-20 20:57:30 +0200 |
commit | 240e3878aec85909aa3805eb6b0ef53b35d4e393 (patch) | |
tree | b556d5d97bfeaec910088c2443e3ed68460296bc /drivers/atmodem/gprs.c | |
parent | 1313a2fe012fca7403b2364d624c101102698a5c (diff) | |
download | ofono-240e3878aec85909aa3805eb6b0ef53b35d4e393.tar.bz2 |
atmodem: Add Nokia specific quirk for AT+CGEREP handling
Diffstat (limited to 'drivers/atmodem/gprs.c')
-rw-r--r-- | drivers/atmodem/gprs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c index 8e248778..85c76954 100644 --- a/drivers/atmodem/gprs.c +++ b/drivers/atmodem/gprs.c @@ -227,13 +227,23 @@ static void at_cgreg_test_cb(gboolean ok, GAtResult *result, g_at_chat_send(gd->chat, cmd, none_prefix, NULL, NULL, NULL); g_at_chat_send(gd->chat, "AT+CGAUTO=0", none_prefix, NULL, NULL, NULL); - /* Ericsson MBM and ST-E modems do not support AT+CGEREP = 2,1 */ - if (gd->vendor == OFONO_VENDOR_MBM) + switch (gd->vendor) { + case OFONO_VENDOR_MBM: + /* Ericsson MBM and ST-E modems don't support AT+CGEREP=2,1 */ g_at_chat_send(gd->chat, "AT+CGEREP=1,0", none_prefix, gprs_initialized, gprs, NULL); - else + break; + case OFONO_VENDOR_NOKIA: + /* Nokia data cards don't support AT+CGEREP=1,0 either */ + g_at_chat_send(gd->chat, "AT+CGEREP=1", none_prefix, + gprs_initialized, gprs, NULL); + break; + default: g_at_chat_send(gd->chat, "AT+CGEREP=2,1", none_prefix, gprs_initialized, gprs, NULL); + break; + } + return; error: |