qmi: sms: Change SMS storage type to UIM
PATCH 1/1 qmi: sms: Change SMS storage type to UIM
In theory, a SIM card can be moved to another device before a particular message in NV is read and then moved back. That might lead to that message being received twice.
Also, some modems (like MDM6600 found in Motorola Droid4), cannot store incoming class 4 messages in NV, only in UIM.
Fix that by using UIM as message storage type instead of NV for class 4 messages.
--- drivers/qmimodem/sms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/qmimodem/sms.c +3 -3
@@ -349,7 +349,7 @@ static void delete_msg(struct ofono_sms *sms, uint8_t tag) param =qmi_param_new ();qmi_param_append_uint8 (param,QMI_WMS_PARAM_DEL_STORE , -QMI_WMS_STORAGE_TYPE_NV ); +QMI_WMS_STORAGE_TYPE_UIM );if (tag ==QMI_WMS_MT_UNDEFINE ) { DBG("delete read msg type %d ndx %d", data->rd_msg_id.type,
@@ -516,7 +516,7 @@ static void get_msg_list(struct ofono_sms *sms)/* query NOT_READ msg list */ qmi_param_append_uint8 (param,QMI_WMS_PARAM_STORAGE_TYPE , -QMI_WMS_STORAGE_TYPE_NV ); +QMI_WMS_STORAGE_TYPE_UIM );qmi_param_append_uint8 (param,QMI_WMS_PARAM_TAG_TYPE ,QMI_WMS_MT_NOT_READ ); qmi_param_append_uint8(param, QMI_WMS_PARAM_MESSAGE_MODE,
@@ -689,7 +689,7 @@ static void get_routes_cb(struct qmi_result *result, void *user_data) new_list->count =L_CPU_TO_LE16 (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_UIM ; new_list->route[0 ].action =QMI_WMS_ACTION_STORE_AND_NOTIFY ; param =qmi_param_new ();
Signature · 1 line
2.25.1
This patch was applied to ofono.git (master) by Denis Kenzior <[email protected]>:
Hello:
This patch was applied to ofono.git (master)
by Denis Kenzior <[email protected]>:
Quoted 8 lines · On Wed, 23 Jul 2025 09:03:32 +0300 you wrote:
In theory, a SIM card can be moved to another device before a particular message in NV is read and then moved back. That might lead to that message being received twice.
Also, some modems (like MDM6600 found in Motorola Droid4), cannot store incoming class 4 messages in NV, only in UIM.
[...]
Here is the summary with links:
- qmi: sms: Change SMS storage type to UIM
https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=d5066b090ded
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html