summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-02-16 08:12:28 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-02-16 08:15:48 +0100
commitbba5a1a00026068ba42430b8b45d92925b87dfbc (patch)
tree71e64740648eed88bb7152b47c1c2d0c278c18f2
parent5fb0594750c68ba4fa7dbc6ec2cdbe73405f2790 (diff)
downloadofono-bba5a1a00026068ba42430b8b45d92925b87dfbc.tar.bz2
atmodem: Ignore results from IFX radio signal strength indication
It seems the that XCIEV notification actually returns results from XCSQ and not the described range 0-7. This makes this notification rather useless to report signal strength.
-rw-r--r--drivers/atmodem/network-registration.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index d098d373..5cf1a021 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -680,8 +680,8 @@ static void ifx_xhomezr_notify(GAtResult *result, gpointer user_data)
static void ifx_xciev_notify(GAtResult *result, gpointer user_data)
{
- struct ofono_netreg *netreg = user_data;
- int strength, ind;
+ //struct ofono_netreg *netreg = user_data;
+ int ind;
GAtResultIter iter;
g_at_result_iter_init(&iter, result);
@@ -692,22 +692,14 @@ static void ifx_xciev_notify(GAtResult *result, gpointer user_data)
if (!g_at_result_iter_next_number(&iter, &ind))
return;
+ DBG("ind %d", ind);
+
/*
* Radio signal strength indicators are defined for 0-7,
- * but in some cases XCIEV just returns CSQ 0-31,99 values.
+ * but this notification seems to return CSQ 0-31,99 values.
+ *
+ * Ignore this indication for now since it can not be trusted.
*/
- if (ind == 0 || ind == 99)
- strength = -1;
- else if (ind == 7)
- strength = 100;
- else if (ind < 7)
- strength = (ind * 15);
- else if (ind > 7)
- strength = (ind * 100) / 31;
-
- DBG("ind %d strength %d", ind, strength);
-
- ofono_netreg_strength_notify(netreg, strength);
}
static void ciev_notify(GAtResult *result, gpointer user_data)