From 417af0eaf2553869a65cb803afd16d33c30d0b52 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 30 May 2017 13:32:38 +0200 Subject: [PATCH] qmimodem/sms: don't check for free ME space on receive 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