diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-03-07 11:12:51 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-03-16 22:18:29 +0100 |
commit | 875ade3e41b61528bbd2b018a5d34c1a1cda9b99 (patch) | |
tree | 927922310111f698acf068c8befeba8c4896e8d4 | |
parent | 957195469ed1eaf6f48b3a70c5d386c5310ec06e (diff) |
iface-modem: improve network registration checks for LTE devices
If a device reports "LTE" in the list of current capabilities, we'll
set EPS network supported by default. This will enable CEREG
registration checks for AT based devices.
If a device reports only "LTE" in the list of current capabilities, we
disable all the other network support flags (e.g. will disable CREG
and CGREG checks among others).
https://bugs.freedesktop.org/show_bug.cgi?id=100170
-rw-r--r-- | src/mm-iface-modem.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 046b3455..6ca5cf57 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -20,6 +20,8 @@ #include "mm-modem-helpers.h" #include "mm-iface-modem.h" +#include "mm-iface-modem-3gpp.h" +#include "mm-iface-modem-cdma.h" #include "mm-base-modem.h" #include "mm-base-modem-at.h" #include "mm-base-sim.h" @@ -3905,6 +3907,25 @@ load_current_capabilities_ready (MMIfaceModem *self, return; } + /* If LTE capability is reported, enable EPS network registration checks */ + if (caps & MM_MODEM_CAPABILITY_LTE) { + mm_dbg ("Setting EPS network as supported"); + g_object_set (G_OBJECT (ctx->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_dbg ("Setting CS/PS/CDMA1x/EVDO networks as unsupported"); + g_object_set (G_OBJECT (ctx->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); + } + /* 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 * exposed in DBus yet. */ |