aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-mbim.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-07-15 23:07:23 +0200
committerDan Williams <dcbw@redhat.com>2018-09-12 17:25:19 +0000
commit7f18a9370a11e4913db72659aa1c92b12f3f7044 (patch)
treed5ae51998355f9051f4cabdd89de325957c0d3b8 /src/mm-modem-helpers-mbim.c
parentac69466c9da7c553c7f4c4a4197614af560abc83 (diff)
broadband-modem-mbim: use QMI-based mode/capability switching if supported
The implementation available in the shared QMI logic can be used as-is, with one important note: if the QMI-based mode/capability switching is used, we MUST also use QMI-based "3GPP network registration" logic. This is needed because the MBIM command used to select which 3GPP network to connect to allows specifying the mask of access technologies desired, and that would overwrite whatever we had previously set with QMI-based mode/capability switching commands.
Diffstat (limited to 'src/mm-modem-helpers-mbim.c')
-rw-r--r--src/mm-modem-helpers-mbim.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
index 0da5588f..680b774b 100644
--- a/src/mm-modem-helpers-mbim.c
+++ b/src/mm-modem-helpers-mbim.c
@@ -21,6 +21,28 @@
/*****************************************************************************/
+MMModemCapability
+mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class,
+ MbimDataClass caps_data_class)
+{
+ MMModemCapability mask = 0;
+
+ if (caps_cellular_class & MBIM_CELLULAR_CLASS_GSM)
+ mask |= MM_MODEM_CAPABILITY_GSM_UMTS;
+
+#if 0 /* Disable until we add MBIM CDMA support */
+ if (caps_cellular_class & MBIM_CELLULAR_CLASS_CDMA)
+ mask |= MM_MODEM_CAPABILITY_CDMA_EVDO;
+#endif
+
+ if (caps_data_class & MBIM_DATA_CLASS_LTE)
+ mask |= MM_MODEM_CAPABILITY_LTE;
+
+ return mask;
+}
+
+/*****************************************************************************/
+
MMModemLock
mm_modem_lock_from_mbim_pin_type (MbimPinType pin_type)
{