modem-helpers: recognize 3GPP2 access tech strings too
Various Gobi-based devices (USB551L, probably Gobis too) can report EVDO and 1X as the current RAT from CNTI so parse that here too.
This commit is contained in:
@@ -59,7 +59,7 @@ load_access_technologies_finish (MMIfaceModem *self,
|
|||||||
p = strchr (p, ',');
|
p = strchr (p, ',');
|
||||||
if (p) {
|
if (p) {
|
||||||
/* We are reporting ALL 3GPP access technologies here */
|
/* We are reporting ALL 3GPP access technologies here */
|
||||||
*access_technologies = mm_3gpp_string_to_access_tech (p + 1);
|
*access_technologies = mm_string_to_access_tech (p + 1);
|
||||||
*mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK;
|
*mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -1332,7 +1332,7 @@ mm_3gpp_facility_to_acronym (MMModem3gppFacility facility)
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
MMModemAccessTechnology
|
MMModemAccessTechnology
|
||||||
mm_3gpp_string_to_access_tech (const gchar *string)
|
mm_string_to_access_tech (const gchar *string)
|
||||||
{
|
{
|
||||||
MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
|
MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
|
||||||
|
|
||||||
@@ -1367,6 +1367,15 @@ mm_3gpp_string_to_access_tech (const gchar *string)
|
|||||||
if (strcasestr (string, "GSM"))
|
if (strcasestr (string, "GSM"))
|
||||||
act |= MM_MODEM_ACCESS_TECHNOLOGY_GSM;
|
act |= MM_MODEM_ACCESS_TECHNOLOGY_GSM;
|
||||||
|
|
||||||
|
if (strcasestr (string, "EvDO Rel0"))
|
||||||
|
act |= MM_MODEM_ACCESS_TECHNOLOGY_EVDO0;
|
||||||
|
|
||||||
|
if (strcasestr (string, "EvDO RelA"))
|
||||||
|
act |= MM_MODEM_ACCESS_TECHNOLOGY_EVDOA;
|
||||||
|
|
||||||
|
if (strcasestr (string, "1xRTT"))
|
||||||
|
act |= MM_MODEM_ACCESS_TECHNOLOGY_1XRTT;
|
||||||
|
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -147,7 +147,7 @@ GByteArray *mm_3gpp_parse_cind_read_response (const gchar *reply,
|
|||||||
MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str);
|
MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str);
|
||||||
gchar *mm_3gpp_facility_to_acronym (MMModem3gppFacility facility);
|
gchar *mm_3gpp_facility_to_acronym (MMModem3gppFacility facility);
|
||||||
|
|
||||||
MMModemAccessTechnology mm_3gpp_string_to_access_tech (const gchar *string);
|
MMModemAccessTechnology mm_string_to_access_tech (const gchar *string);
|
||||||
|
|
||||||
gchar *mm_3gpp_parse_operator (const gchar *reply,
|
gchar *mm_3gpp_parse_operator (const gchar *reply,
|
||||||
MMModemCharset cur_charset);
|
MMModemCharset cur_charset);
|
||||||
|
Reference in New Issue
Block a user