aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2014-02-26 12:45:04 +0100
committerAleksander Morgado <aleksander@aleksander.es>2014-02-28 16:35:17 +0100
commit82340cd5f7e1c464eda820632b07cf55e78cc90f (patch)
treef6171491fb44077e159d0ae7bf6239ce4317997c
parenta9a4a2a337d14baecbcc6a76670ed48ce6b91259 (diff)
cinterion: add support for HSUPA+HSDPA reported access tech
-rw-r--r--plugins/cinterion/mm-broadband-modem-cinterion.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c
index dd1dca5b..72f2c7f3 100644
--- a/plugins/cinterion/mm-broadband-modem-cinterion.c
+++ b/plugins/cinterion/mm-broadband-modem-cinterion.c
@@ -551,22 +551,27 @@ static MMModemAccessTechnology
get_access_technology_from_psinfo (const gchar *psinfo,
GError **error)
{
- if (strlen (psinfo) == 1) {
- switch (psinfo[0]) {
- case '0':
+ guint psinfoval;
+
+ if (mm_get_uint_from_str (psinfo, &psinfoval)) {
+ switch (psinfoval) {
+ case 0:
return MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
- case '1':
- case '2':
+ case 1:
+ case 2:
return MM_MODEM_ACCESS_TECHNOLOGY_GPRS;
- case '3':
- case '4':
+ case 3:
+ case 4:
return MM_MODEM_ACCESS_TECHNOLOGY_EDGE;
- case '5':
- case '6':
+ case 5:
+ case 6:
return MM_MODEM_ACCESS_TECHNOLOGY_UMTS;
- case '7':
- case '8':
+ case 7:
+ case 8:
return MM_MODEM_ACCESS_TECHNOLOGY_HSDPA;
+ case 9:
+ case 10:
+ return (MM_MODEM_ACCESS_TECHNOLOGY_HSDPA | MM_MODEM_ACCESS_TECHNOLOGY_HSUPA);
default:
break;
}