summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-11-22 10:15:10 +0100
committerHarald Welte <laforge@gnumonks.org>2012-11-22 10:15:10 +0100
commit85f4e1b3b8b386fd7e25b33d83768fe8a100e051 (patch)
tree17d8392283f2abbc44bdbf41be3309d1c3d4fbde
parent73a809e57b8a531b9b8a33b6841ed3df2ea22620 (diff)
fix previous commit: use dbm2rxlev()
As andreas points out, there are structure members that are called 'rxlev' but which don't use the scaling (0..63) of the GSM specs, but which are already a signed type and in dBm. So they need to be converted. TODO: Rename those structure members to rxlev_dbm or something that explicitly states it is _not_ an 'RXLEV' value in terms of GSM.
-rw-r--r--src/host/layer23/src/misc/cell_log.c2
-rw-r--r--src/host/layer23/src/mobile/gsm322.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c
index afd532a..8fe3e1b 100644
--- a/src/host/layer23/src/misc/cell_log.c
+++ b/src/host/layer23/src/misc/cell_log.c
@@ -343,7 +343,7 @@ static void start_sync(void)
state = SCAN_STATE_SYNC;
l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL);
l1ctl_tx_fbsb_req(ms, arfcn, L1CTL_FBSB_F_FB01SB, 100, 0,
- CCCH_MODE_NONE, pm[arfcn].rxlev);
+ CCCH_MODE_NONE, dbm2rxlev(pm[arfcn].rxlev));
}
static void start_pm(void)
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index 273f9db..f56fbda 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -492,7 +492,7 @@ static int gsm322_sync_to_cell(struct gsm322_cellsel *cs,
return l1ctl_tx_fbsb_req(ms, cs->arfcn,
L1CTL_FBSB_F_FB01SB, 100, 0,
cs->ccch_mode,
- cs->list[cs->arfci].rxlev);
+ dbm2rxlev(cs->list[cs->arfci].rxlev));
}
/* this is called whenever the serving cell is unselectied */