[PATCH 2/2] broadband-modem: fix capabilities in 4G-only devices
Dan Williams
dcbw at redhat.com
Fri Mar 24 20:12:46 UTC 2017
On Sun, 2017-03-12 at 21:05 +0100, Aleksander Morgado wrote:
> The +CGSM capability is saying that the modem is a 3GPP modem, but
> that doesn't necessarily mean it's a GSM/UMTS modem, it could be a
> LTE-only device.
>
> We did add the GSM_UMTS capability when +CGSM was found, so now we'll
> check if the device only reports 4G-only mode, and remove the
> capability if so.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=100155
LGTM.
Dan
> ---
> src/mm-broadband-modem.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
> index aa84fc7e..302fc3db 100644
> --- a/src/mm-broadband-modem.c
> +++ b/src/mm-broadband-modem.c
> @@ -397,6 +397,21 @@ current_capabilities_ws46_test_ready
> (MMBaseModem *self,
> break;
> }
> }
> +
> + /* The +CGSM capability is saying that the modem is a 3GPP
> modem, but that
> + * doesn't necessarily mean it's a GSM/UMTS modem, it could be a
> LTE-only
> + * device. We did add the GSM_UMTS capability when +CGSM was
> found, so now
> + * we'll check if the device only reports 4G-only mode, and
> remove the
> + * capability if so.
> + *
> + * Note that we don't change the default +CGSM -> GSM/UMTS
> logic, we just
> + * fix it up.
> + */
> + if ((modes->len == 1) && (g_array_index (modes, MMModemMode, 0)
> == MM_MODEM_MODE_4G)) {
> + g_assert (ctx->caps & MM_MODEM_CAPABILITY_LTE);
> + ctx->caps &= ~MM_MODEM_CAPABILITY_GSM_UMTS;
> + }
> +
> g_array_unref (modes);
>
> out:
More information about the ModemManager-devel
mailing list