broadband-modem: detect old Mediatek 62xx chipsets as GSM-capable
They don't necessarily reply to +WS46 but like old Motorola ESX
devices they reply to +CGMM with a known string.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/980
Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 8cf25a97a1)
This commit is contained in:
@@ -768,11 +768,14 @@ parse_caps_cgmm (MMBaseModem *self,
|
|||||||
if (!response)
|
if (!response)
|
||||||
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE;
|
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE;
|
||||||
|
|
||||||
/* This check detects some really old Motorola GPRS dongles and phones */
|
/* This check detects some really old Motorola and Mediatek GPRS dongles
|
||||||
|
* and phones.
|
||||||
|
*/
|
||||||
if (strstr (response, "GSM900") ||
|
if (strstr (response, "GSM900") ||
|
||||||
strstr (response, "GSM1800") ||
|
strstr (response, "GSM1800") ||
|
||||||
strstr (response, "GSM1900") ||
|
strstr (response, "GSM1900") ||
|
||||||
strstr (response, "GSM850")) {
|
strstr (response, "GSM850") ||
|
||||||
|
strstr (response, "MTK2")) {
|
||||||
/* At least, it's a GSM modem */
|
/* At least, it's a GSM modem */
|
||||||
*result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS);
|
*result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS);
|
||||||
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS;
|
return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user