diff options
author | Dan Williams <dcbw@redhat.com> | 2012-05-04 17:38:36 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-05-04 17:38:36 -0500 |
commit | 90f4a034b203d08a3c1a04fcdb6bbbf16d982b7a (patch) | |
tree | 1901ad68ad8b13b47f79260349d4b7c6552e3012 /src | |
parent | 1e024c711abf303aa2ff53676ad1bbd3dfceb982 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-modem-helpers.c | 11 | ||||
-rw-r--r-- | src/mm-modem-helpers.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index a99eac35..6019dfe9 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -1332,7 +1332,7 @@ mm_3gpp_facility_to_acronym (MMModem3gppFacility facility) /*************************************************************************/ 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; @@ -1367,6 +1367,15 @@ mm_3gpp_string_to_access_tech (const gchar *string) if (strcasestr (string, "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; } diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index 10ec800e..8da0a176 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -147,7 +147,7 @@ GByteArray *mm_3gpp_parse_cind_read_response (const gchar *reply, MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str); 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, MMModemCharset cur_charset); |