diff options
Diffstat (limited to 'meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch')
-rw-r--r-- | meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch b/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch new file mode 100644 index 0000000000..3346d85809 --- /dev/null +++ b/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Index: gsm/src/gsmd/vendor_tihtc.c | ||
2 | =================================================================== | ||
3 | --- gsm.orig/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:39.000000000 +0200 | ||
4 | +++ gsm/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:41.000000000 +0200 | ||
5 | @@ -90,6 +90,8 @@ | ||
6 | struct gsmd_evt_auxdata *aux; | ||
7 | struct gsmd_ucmd *ucmd = usock_build_event(GSMD_MSG_EVENT, GSMD_EVT_SIGNAL, | ||
8 | sizeof(*aux)); | ||
9 | + static int rssi_table[] = { 0,5,10,15,20,25,99 }; | ||
10 | + unsigned int i; | ||
11 | |||
12 | DEBUGP("entering htccsq_parse param=`%s'\n", param); | ||
13 | if (!ucmd) | ||
14 | @@ -98,9 +100,10 @@ | ||
15 | |||
16 | aux = (struct gsmd_evt_auxdata *) ucmd->buf; | ||
17 | |||
18 | - /* FIXME: contains values 1-5, should be mapped to 0-31 somehow? */ | ||
19 | - /* 2 --> 11 */ | ||
20 | - aux->u.signal.sigq.rssi = atoi(buf); | ||
21 | + i = atoi(buf); | ||
22 | + if (i > 6) | ||
23 | + i = 6; | ||
24 | + aux->u.signal.sigq.rssi = rssi_table[atoi(buf)]; | ||
25 | aux->u.signal.sigq.ber = 99; | ||
26 | |||
27 | DEBUGP("sending EVT_SIGNAL\n"); | ||