aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-qmi.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2025-04-03 11:17:44 +0200
committerDan Williams <dan@ioncontrol.co>2025-04-13 05:01:32 +0000
commit9c5f5833e514b2ed93518f30da1aacccceba477a (patch)
tree74030f3f8facd7a0c5e5aaf5ea9ee2e5622a79e6 /src/mm-modem-helpers-qmi.c
parentbf8bd7c4adf214a3ca810a7d5670a301c1f77bae (diff)
broadband-modem-qmi: Add initial interface bits
This allows to receive Cell Broadcast messages. Tested with single part CBMs only as my setup currently only allows for these. Helps: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325 Signed-off-by: Guido Günther <agx@sigxcpu.org>
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r--src/mm-modem-helpers-qmi.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index 7a87454b..ea09b9d8 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -2251,6 +2251,22 @@ mm_sms_state_from_qmi_message_tag (QmiWmsMessageTagType tag)
/*****************************************************************************/
+MMCbmState
+mm_cbm_state_from_qmi_message_tag (QmiWmsMessageTagType tag)
+{
+ switch (tag) {
+ case QMI_WMS_MESSAGE_TAG_TYPE_MT_READ:
+ case QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ:
+ return MM_CBM_STATE_RECEIVED;
+ case QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT:
+ case QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT:
+ default:
+ return MM_CBM_STATE_UNKNOWN;
+ }
+}
+
+/*****************************************************************************/
+
QmiWdsAuthentication
mm_bearer_allowed_auth_to_qmi_authentication (MMBearerAllowedAuth auth,
gpointer log_object,