diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-12 17:46:57 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-12 17:46:57 +0100 |
commit | 8432650b2a5da5b42dea1d0fcb604d0e4f9c6e5d (patch) | |
tree | 8fd5a84bab9cd100d9286080bf2d1505ce582a4d | |
parent | cb1288c06bce45b4850f2b85716b25fad3db1d4c (diff) |
broadband-modem-qmi: explicitly add LTE as current cap if modem caps report italeksander/mode-switching
For loading current capabilities we use a mix of "Technology Preference" (TP),
"System Selection Preference" (SSP) and DMS-reported capabilities. But, as we
also use TP and SSP for allowed modes, it may be the case that we end up
leaving 4G out of the allowed modes, which afterwards will make the modem not
report LTE as current capabilitiy, as TP/SSP don't include LTE.
So, just assume LTE is a current capability if DMS-reported capabilities include
it. We can really do this because LTE is the only 4G technology, the same logic
wouldn't apply correctly for 2G or 3G (due to having different techs for 3GPP
and 3GPP2).
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 4a316c55..676bca95 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -286,8 +286,17 @@ load_current_capabilities_get_capabilities_ready (QmiClientDms *client, */ if (ctx->capabilities == MM_MODEM_CAPABILITY_NONE) ctx->capabilities = mask; - else + else { ctx->capabilities &= mask; + + /* 4G is a special case here. We may not get 4G reported by TP/SSP + * because the current configuration is e.g. 2g-only, but still we can + * afterwards change to 4G allowed mode with either TP/SSP. So, if + * the modem reports LTE as capabilities, make sure we add it to the + * current capabilities, even if not currently allowed */ + if (mask & MM_MODEM_CAPABILITY_LTE) + ctx->capabilities |= MM_MODEM_CAPABILITY_LTE; + } } if (output) |