From e0e4941098577ba44840e2277a5f848c1d65a3f4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 18 Apr 2022 10:16:39 +0200 Subject: [PATCH] lchan_fsm: Ignore other SAPIs of RLL_REL_IND for SAPI=0 is received If the BTS tells us SAPI=0 is gone, there is no point in trying to keep the lchan around for SAPI=3, as it is not possible to operate GSM with SAPI=0 gone. This occurred with RBS6000, which don't seem to send RLL REL IND for SAPI3 after doing so for SAPI0. However, rather than an ericsson-specific hack, let's make this the general rule: If SAPI=0 is gone, don't stop the lchan from being released. Change-Id: Ia9caa5b0a5efdc459d94621367376927959a6e65 Related: OS#5530 --- src/osmo-bsc/lchan_fsm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 00bb605c4..0b23f6c78 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -1203,6 +1203,13 @@ static void handle_rll_rel_ind_or_conf(struct osmo_fsm_inst *fi, uint32_t event, if (lchan->conn && sapi == 0 && !(link_id & 0xc0)) { LOG_LCHAN(lchan, LOGL_DEBUG, "lchan is releasing\n"); gscon_lchan_releasing(lchan->conn, lchan); + + /* if SAPI=0 is gone, it makes no sense if other SAPIs are still around, + * this is not a valid configuration and we should forget about them. + * This is particularly relevant in case of Ericsson RBS6000, which doesn't + * seem to send a RLL_REL_IND for SAPI=3 if there was already one for SAPI=0 */ + for_each_active_sapi(sapi, 1, lchan) + lchan->sapis[sapi] = LCHAN_SAPI_UNUSED; } /* The caller shall check whether all SAPIs are released and cause a state chg */