All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qmimodem/sms: don't check for free ME space on receive
@ 2017-05-30 11:32 Alexander Couzens
  2017-05-30 22:31 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Couzens @ 2017-05-30 11:32 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

If the ME storage is full, the modem will reject new messages
with a SMPP RP-Error 'Protocol error, unspecific'.
It seems the qmimodem is first checking the ME storage for
free space, then deliver the SMS via QMI and not saving it
to the ME anyway.
Using QMI_WMS_STORAGE_TYPE_NONE it doesn't check for free space.

Tested-on: Quectel EC20
---
 drivers/qmimodem/sms.c | 2 +-
 drivers/qmimodem/wms.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/qmimodem/sms.c b/drivers/qmimodem/sms.c
index 43bf22d1..91501b75 100644
--- a/drivers/qmimodem/sms.c
+++ b/drivers/qmimodem/sms.c
@@ -411,7 +411,7 @@ static void get_routes_cb(struct qmi_result *result, void *user_data)
 	new_list->count = GUINT16_TO_LE(1);
 	new_list->route[0].msg_type = QMI_WMS_MSG_TYPE_P2P;
 	new_list->route[0].msg_class = QMI_WMS_MSG_CLASS_NONE;
-	new_list->route[0].storage_type = QMI_WMS_STORAGE_TYPE_NV;
+	new_list->route[0].storage_type = QMI_WMS_STORAGE_TYPE_NONE;
 	new_list->route[0].action = QMI_WMS_ACTION_TRANSFER_AND_ACK;
 
 	param = qmi_param_new();
diff --git a/drivers/qmimodem/wms.h b/drivers/qmimodem/wms.h
index dae86c17..21fe4d95 100644
--- a/drivers/qmimodem/wms.h
+++ b/drivers/qmimodem/wms.h
@@ -62,6 +62,7 @@ struct qmi_wms_param_message {
 #define QMI_WMS_STORAGE_TYPE_UIM		0
 #define QMI_WMS_STORAGE_TYPE_NV			1
 #define QMI_WMS_STORAGE_TYPE_UNKNOWN		2
+#define QMI_WMS_STORAGE_TYPE_NONE		255
 
 #define QMI_WMS_MESSAGE_MODE_GSMWCDMA		1
 
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qmimodem/sms: don't check for free ME space on receive
  2017-05-30 11:32 [PATCH] qmimodem/sms: don't check for free ME space on receive Alexander Couzens
@ 2017-05-30 22:31 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2017-05-30 22:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

Hi Alexander,

On 05/30/2017 06:32 AM, Alexander Couzens wrote:
> If the ME storage is full, the modem will reject new messages
> with a SMPP RP-Error 'Protocol error, unspecific'.
> It seems the qmimodem is first checking the ME storage for
> free space, then deliver the SMS via QMI and not saving it
> to the ME anyway.
> Using QMI_WMS_STORAGE_TYPE_NONE it doesn't check for free space.
>
> Tested-on: Quectel EC20
> ---
>  drivers/qmimodem/sms.c | 2 +-
>  drivers/qmimodem/wms.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>

Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-30 22:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 11:32 [PATCH] qmimodem/sms: don't check for free ME space on receive Alexander Couzens
2017-05-30 22:31 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.