summaryrefslogtreecommitdiffstats
path: root/drivers/isimodem
diff options
context:
space:
mode:
authorAki Niemi <aki.niemi@nokia.com>2011-04-14 14:45:54 +0300
committerAki Niemi <aki.niemi@nokia.com>2011-04-14 15:30:23 +0300
commit27046f9505ff100b2e76ee6e021daba0a8e98a21 (patch)
treec956d559b9dccdbd635978e9ec5034d227387065 /drivers/isimodem
parent64100070c7c55aac1c6745ee420befb76bb08f1b (diff)
downloadofono-27046f9505ff100b2e76ee6e021daba0a8e98a21.tar.bz2
isimodem: Refactor sms driver
Diffstat (limited to 'drivers/isimodem')
-rw-r--r--drivers/isimodem/sms.c17
-rw-r--r--drivers/isimodem/sms.h4
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c
index 7f12fbdb..6ffee982 100644
--- a/drivers/isimodem/sms.c
+++ b/drivers/isimodem/sms.c
@@ -473,30 +473,27 @@ static gboolean submit_tpdu(GIsiClient *client, unsigned char *pdu, int pdu_len,
0, /* Repeated message */
0, 0, /* Filler */
2, /* Subblock count */
+ ISI_16BIT(SMS_SB_SMS_PARAMETERS),
+ ISI_16BIT(8), /* Subblock length */
+ SMS_PARAMETER_LOCATION_DEFAULT,
+ SMS_PI_SERVICE_CENTER_ADDRESS,
+ 0, 0, /* Filler */
ISI_16BIT(SMS_SB_TPDU),
ISI_16BIT(tpdu_sb_len),
tpdu_len,
0, /* Filler */
/* Databytes aligned to next 32bit boundary */
};
- uint8_t params[] = {
- ISI_16BIT(SMS_SB_SMS_PARAMETERS),
- ISI_16BIT(8), /* Subblock length */
- 1, /* Location number */
- SMS_PI_SERVICE_CENTER_ADDRESS,
- 0, 0, /* Filler */
- };
uint8_t padding[4] = { 0 };
- struct iovec iov[4] = {
+ struct iovec iov[3] = {
{ hdr, sizeof(hdr) },
{ pdu + pdu_len - tpdu_len, tpdu_len },
{ padding, tpdu_pad_len },
- { params, sizeof(params) },
};
/* FIXME: Missing SB for SCA if provided */
- return g_isi_client_vsend_with_timeout(client, iov, 4, SMS_TIMEOUT,
+ return g_isi_client_vsend_with_timeout(client, iov, 3, SMS_TIMEOUT,
submit_tpdu_resp_cb, data,
notify);
}
diff --git a/drivers/isimodem/sms.h b/drivers/isimodem/sms.h
index 67bcb87e..ab29463d 100644
--- a/drivers/isimodem/sms.h
+++ b/drivers/isimodem/sms.h
@@ -234,6 +234,10 @@ enum sms_parameter_indicator {
SMS_PI_VALIDITY_PERIOD = 0x10,
};
+enum sms_parameter_location {
+ SMS_PARAMETER_LOCATION_DEFAULT = 0x00,
+};
+
#ifdef __cplusplus
};
#endif