summaryrefslogtreecommitdiff
path: root/src/gsmd
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-17 08:35:10 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-17 08:35:10 +0000
commit4a27ed37e287075a2476b9452e1f5eba0bef4e57 (patch)
tree48c1a968659fe218c847f4f8b07f8a63f8917404 /src/gsmd
parentbabd25d431a4453ce79f5281e1f7b0a39d2edbef (diff)
HTC TI modem sequence fixlet.
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2730 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/gsmd')
-rw-r--r--src/gsmd/vendor_tihtc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gsmd/vendor_tihtc.c b/src/gsmd/vendor_tihtc.c
index 42f9d50..5ec257c 100644
--- a/src/gsmd/vendor_tihtc.c
+++ b/src/gsmd/vendor_tihtc.c
@@ -90,6 +90,8 @@ static int htccsq_parse(char *buf, int len, const char *param,
struct gsmd_evt_auxdata *aux;
struct gsmd_ucmd *ucmd = usock_build_event(GSMD_MSG_EVENT, GSMD_EVT_SIGNAL,
sizeof(*aux));
+ static int rssi_table[] = { 0,5,10,15,20,25,99 };
+ unsigned int i;
DEBUGP("entering htccsq_parse param=`%s'\n", param);
if (!ucmd)
@@ -98,9 +100,10 @@ static int htccsq_parse(char *buf, int len, const char *param,
aux = (struct gsmd_evt_auxdata *) ucmd->buf;
- /* FIXME: contains values 1-5, should be mapped to 0-31 somehow? */
- /* 2 --> 11 */
- aux->u.signal.sigq.rssi = atoi(buf);
+ i = atoi(buf);
+ if (i > 6)
+ i = 6;
+ aux->u.signal.sigq.rssi = rssi_table[atoi(buf)];
aux->u.signal.sigq.ber = 99;
DEBUGP("sending EVT_SIGNAL\n");
personal git repositories of Harald Welte. Your mileage may vary