summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-06-21 15:03:42 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-06-21 15:21:40 -0500
commit054ed2653a5a10f81f2a93f3f4bf4f3d103ddb25 (patch)
tree6b0ee8fc4f92aede20f361a24cc0f0080f85425b /drivers
parent4d82b67ea11e24709bd316f6d7a08471977f1fbc (diff)
atmodem: Support CDS indicators for MBM
MBM does not advertise support for CNMA, yet only supports CDS style notifications which do not need to be acknowledged.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atmodem/sms.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index c1767766..f7c3344c 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -297,6 +297,7 @@ static inline void at_ack_delivery(struct ofono_sms *sms)
static void at_cds_notify(GAtResult *result, gpointer user_data)
{
struct ofono_sms *sms = user_data;
+ struct sms_data *data = ofono_sms_get_data(sms);
long pdu_len;
int tpdu_len;
const char *hexpdu;
@@ -318,7 +319,8 @@ static void at_cds_notify(GAtResult *result, gpointer user_data)
decode_hex_own_buf(hexpdu, -1, &pdu_len, 0, pdu);
ofono_sms_status_notify(sms, pdu, pdu_len, tpdu_len);
- at_ack_delivery(sms);
+ if (data->cnma_enabled)
+ at_ack_delivery(sms);
}
static void at_cmt_notify(GAtResult *result, gpointer user_data)
@@ -734,14 +736,14 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
* sends the device into la-la land.
*/
if (data->vendor == OFONO_VENDOR_NOVATEL)
- /* MSM devices advertise support for mode 2, but return an
- * error if we attempt to actually use it. */
- mode = "2";
+ mode = "20";
else
- /* Sounds like 2 is the sanest mode */
- mode = data->cnma_enabled ? "10" : "20";
+ mode = "120";
- /* Always deliver Status-Reports via +CDS or don't deliver at all */
+ /*
+ * Try to deliver Status-Reports via +CDS, then CDSI or don't
+ * deliver at all
+ * */
if (!append_cnmi_element(buf, &len, cnmi_opts[3], mode, FALSE))
return FALSE;