diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-03-23 07:58:23 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-04-09 12:38:50 +0000 |
commit | 05301f23a1f3fdacb3a024b38d48d0129305daf0 (patch) | |
tree | 1ba125cf24e63ec41b9d8007a39f18bad2e63c4d /src/mm-iface-modem.c | |
parent | 9144a9fa344856c484e3354eafc41c11e4a0c4a2 (diff) |
iface-modem-3gpp: new 5GS network support
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index a39fd001..eaab6c17 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -4256,24 +4256,35 @@ load_current_capabilities_ready (MMIfaceModem *self, return; } - /* If LTE capability is reported, enable EPS network registration checks */ + /* By default CS/PS/CDMA1X/EVDO network registration checks are the only + * ones enabled, so fix them up based on capabilities, enabling EPS or 5GS + * checks if required, and disabling CS/PS/CDMA1X/EVDO if required. */ if (caps & MM_MODEM_CAPABILITY_LTE) { mm_obj_dbg (self, "setting EPS network as supported"); g_object_set (G_OBJECT (self), MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED, TRUE, NULL); } - - /* If LTE capability is the only one reported, disable all other network registration checks */ - if (caps == MM_MODEM_CAPABILITY_LTE) { - mm_obj_dbg (self, "setting CS/PS/CDMA1x/EVDO networks as unsupported"); + if (caps & MM_MODEM_CAPABILITY_5GNR) { + mm_obj_dbg (self, "setting 5GS network as supported"); + g_object_set (G_OBJECT (self), + MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED, TRUE, + NULL); + } + if (!(caps & MM_MODEM_CAPABILITY_CDMA_EVDO)) { + mm_obj_dbg (self, "setting CDMA1x/EVDO networks as unsupported"); g_object_set (G_OBJECT (self), - MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, FALSE, - MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, FALSE, MM_IFACE_MODEM_CDMA_CDMA1X_NETWORK_SUPPORTED, FALSE, MM_IFACE_MODEM_CDMA_EVDO_NETWORK_SUPPORTED, FALSE, NULL); } + if (!(caps & MM_MODEM_CAPABILITY_GSM_UMTS)) { + mm_obj_dbg (self, "setting CS/PS networks as unsupported"); + g_object_set (G_OBJECT (self), + MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, FALSE, + MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, FALSE, + NULL); + } /* Update current caps right away, even if we may fix them during the * multimode device check. No big deal in updating them twice, as we're not |