summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristopher Vogl <christopher.vogl@hale.at>2011-12-15 14:34:41 +0100
committerDenis Kenzior <denkenz@gmail.com>2011-12-15 22:37:10 -0600
commit750658f23fcfb1a005756790e3a8b0cd1e25eee0 (patch)
tree6a44c65a5760edd40e36e0299f5a38ab18c3220a /drivers
parentfb009fafd6ac60546ee2f69a1b34402fb2744753 (diff)
downloadofono-750658f23fcfb1a005756790e3a8b0cd1e25eee0.tar.bz2
telit: use CIND "rssi" indicator instead of "signal"
"signal" indicator permanently reports 99 (not measurable).
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atmodem/network-registration.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 2d808adb..b9432418 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -1288,6 +1288,7 @@ static void cind_support_cb(gboolean ok, GAtResult *result, gpointer user_data)
struct netreg_data *nd = ofono_netreg_get_data(netreg);
GAtResultIter iter;
const char *str;
+ char *signal_identifier = "signal";
int index;
int min = 0;
int max = 0;
@@ -1306,8 +1307,10 @@ static void cind_support_cb(gboolean ok, GAtResult *result, gpointer user_data)
* Telit encapsulates the CIND=? tokens with braces
* so we need to skip them
*/
- if (nd->vendor == OFONO_VENDOR_TELIT)
+ if (nd->vendor == OFONO_VENDOR_TELIT) {
g_at_result_iter_open_list(&iter);
+ signal_identifier = "rssi";
+ }
while (g_at_result_iter_open_list(&iter)) {
/* Reset invalid default value for every token */
@@ -1333,7 +1336,7 @@ static void cind_support_cb(gboolean ok, GAtResult *result, gpointer user_data)
if (!g_at_result_iter_close_list(&iter))
goto error;
- if (g_str_equal("signal", str) == TRUE) {
+ if (g_str_equal(signal_identifier, str) == TRUE) {
nd->signal_index = index;
nd->signal_min = min;
nd->signal_max = max;