[PATCH 3/4] Fix: Nokia BTS does not send RELease CONFirm message for local end release

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Andreas Eversberg jolly at eversberg.eu
Thu Dec 5 15:02:38 UTC 2013


From: Andreas Eversberg <andreas at eversberg.eu>

TS 04.06 Chapter 5.4.4.4 "Local end release procedure" states that a
confirm must be sent by layer 2 when receiving a local end release
request. Nokia BTS might not send it, so this patch assumes that it has
been received already.

In order to correctly switch a channel (handover or assignment), local
end release is required.
---
 openbsc/include/openbsc/gsm_data.h |   12 ++++++++++++
 openbsc/src/libbsc/abis_rsl.c      |   15 ++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 8741505..7c3ca84 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -370,6 +370,18 @@ static inline int is_siemens_bts(struct gsm_bts *bts)
 	return 0;
 }
 
+static inline int is_nokia_bts(struct gsm_bts *bts)
+{
+	switch (bts->type) {
+	case GSM_BTS_TYPE_NOKIA_SITE:
+		return 1;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
 enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
 const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
 
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 41bfcdc..b107854 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -867,6 +867,8 @@ int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id)
 	return abis_rsl_sendmsg(msg);
 }
 
+static void rsl_handle_release(struct gsm_lchan *lchan);
+
 /* Chapter 8.3.7 Request the release of multiframe mode of RLL connection.
    This is what higher layers should call.  The BTS then responds with
    RELEASE CONFIRM, which we in turn use to trigger RSL CHANNEL RELEASE,
@@ -890,7 +892,18 @@ int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id,
 	DEBUGP(DRLL, "%s RSL RLL RELEASE REQ (link_id=0x%02x, reason=%u)\n",
 		gsm_lchan_name(lchan), link_id, release_mode);
 
-	return abis_rsl_sendmsg(msg);
+	abis_rsl_sendmsg(msg);
+
+	/* Do not wait for Nokia BTS to send the confirm. */
+	if (is_nokia_bts(lchan->ts->trx->bts)
+	 && release_mode == RSL_REL_LOCAL_END) {
+		DEBUGP(DRLL, "Do not wait for RELease CONFirm, because Nokia"
+			" BTS does not send it.\n");
+		lchan->sapis[link_id & 0x7] = LCHAN_SAPI_UNUSED;
+		rsl_handle_release(lchan);
+	}
+
+	return 0;
 }
 
 int rsl_lchan_set_state(struct gsm_lchan *lchan, int state)
-- 
1.7.3.4





More information about the OpenBSC mailing list