aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-mbim.c
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2021-02-26 22:57:04 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-04-30 18:40:29 +0000
commite8edcedc9e80332a8dc862113acb05f8ed57b987 (patch)
tree1f2872f4af1406873a39cd777a390f285c83175f /src/mm-modem-helpers-mbim.c
parentdfc04cbc2ede5e8c5a007fb79d0a2428c5648be4 (diff)
modem-helpers: introduce functions to convert MMModem3gppFacility
Diffstat (limited to 'src/mm-modem-helpers-mbim.c')
-rw-r--r--src/mm-modem-helpers-mbim.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
index c907b22e..be9cd886 100644
--- a/src/mm-modem-helpers-mbim.c
+++ b/src/mm-modem-helpers-mbim.c
@@ -207,6 +207,34 @@ mm_3gpp_network_info_list_from_mbim_providers (const MbimProvider *const *provid
/*****************************************************************************/
+MbimPinType
+mbim_pin_type_from_mm_modem_3gpp_facility (MMModem3gppFacility facility)
+{
+ switch (facility) {
+ case MM_MODEM_3GPP_FACILITY_NET_PERS:
+ return MBIM_PIN_TYPE_NETWORK_PIN;
+ case MM_MODEM_3GPP_FACILITY_NET_SUB_PERS:
+ return MBIM_PIN_TYPE_NETWORK_SUBSET_PIN;
+ case MM_MODEM_3GPP_FACILITY_PROVIDER_PERS:
+ return MBIM_PIN_TYPE_SERVICE_PROVIDER_PIN;
+ case MM_MODEM_3GPP_FACILITY_CORP_PERS:
+ return MBIM_PIN_TYPE_CORPORATE_PIN;
+ case MM_MODEM_3GPP_FACILITY_SIM:
+ return MBIM_PIN_TYPE_PIN1;
+ case MM_MODEM_3GPP_FACILITY_FIXED_DIALING:
+ return MBIM_PIN_TYPE_PIN2;
+ case MM_MODEM_3GPP_FACILITY_PH_SIM:
+ return MBIM_PIN_TYPE_DEVICE_SIM_PIN;
+ case MM_MODEM_3GPP_FACILITY_PH_FSIM:
+ return MBIM_PIN_TYPE_DEVICE_FIRST_SIM_PIN;
+ case MM_MODEM_3GPP_FACILITY_NONE:
+ default:
+ return MBIM_PIN_TYPE_UNKNOWN;
+ }
+}
+
+/*****************************************************************************/
+
GError *
mm_mobile_equipment_error_from_mbim_nw_error (MbimNwError nw_error)
{