From 3318b3f6227e1ce912ace5a3a4a3c269056177ae Mon Sep 17 00:00:00 2001 From: "Andreas.Eversberg" Date: Wed, 13 Oct 2010 18:30:59 +0000 Subject: [PATCH] [layer23] Fix of signal loss handling The cell must be kept "selected" in case of loosing radio link. It is required to perform reselection of that cell or of the given neighbor cells. --- src/host/layer23/src/mobile/gsm322.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index deed6a6..e3ddab0 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -2506,15 +2506,16 @@ static void gsm322_cs_loss(void *arg) LOGP(DCS, LOGL_INFO, "Loss of CCCH.\n"); - /* unset selected cell */ - gsm322_unselect_cell(cs); - if (cs->state == GSM322_C3_CAMPED_NORMALLY || cs->state == GSM322_C7_CAMPED_ANY_CELL) { if (rr->state == GSM48_RR_ST_IDLE) { struct msgb *nmsg; - LOGP(DCS, LOGL_INFO, "Trigger re-selection.\n"); + LOGP(DCS, LOGL_INFO, "Loss of CCCH, Trigger " + "re-selection.\n"); + + /* unset selected cell */ + gsm322_unselect_cell(cs); nmsg = gsm322_msgb_alloc(GSM322_EVENT_CELL_RESEL); if (!nmsg) @@ -2522,7 +2523,11 @@ static void gsm322_cs_loss(void *arg) gsm322_c_event(ms, nmsg); msgb_free(nmsg); } else { - LOGP(DCS, LOGL_INFO, "Trigger RR abort.\n"); + LOGP(DCS, LOGL_INFO, "Loss of SACCH, Trigger RR " + "abort.\n"); + + /* keep cell info for re-selection */ + gsm48_rr_los(ms); /* be shure that nothing else is done after here * because the function call above may cause -- 2.20.1