From 6d2625ce0cb2e8f455493c9c4869b9e5ae0faba9 Mon Sep 17 00:00:00 2001 From: "Andreas.Eversberg" Date: Wed, 29 Sep 2010 13:28:04 +0000 Subject: [layer23] Added a workarround to ignore the first (invalid) PM result --- src/host/layer23/src/mobile/gsm322.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/host') diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index f312944c..114d6600 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -2436,8 +2436,14 @@ static int gsm322_l1_signal(unsigned int subsys, unsigned int signal, return -EINVAL; i = mr->band_arfcn & 1023; rxlev = mr->rx_lev; + if ((cs->list[i].flags & GSM322_CS_FLAG_POWER)) { + LOGP(DCS, LOGL_ERROR, "Getting PM for frequency %d " + "twice. Overwriting the first! Please fix " + "prim_pm.c\n", i); + } cs->list[i].rxlev = rxlev; cs->list[i].flags |= GSM322_CS_FLAG_POWER; + cs->list[i].flags &= ~GSM322_CS_FLAG_SIGNAL; /* if minimum level is reached or if we stick to a cell */ if (rxlev2dbm(rxlev) >= ms->support.min_rxlev_db || ms->settings.stick) { -- cgit v1.2.3