[MERGED] osmo-bsc[master]: HO: Assign SDCCH on channel request

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/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jan 19 22:09:22 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: HO: Assign SDCCH on channel request
......................................................................


HO: Assign SDCCH on channel request

This is needed, so channel can be negotiated before the actual channel
type is assigned.

In case there is no SDCCH available, try to assign what ever the MS requested.
If this is not possible try to assign TCH/F. If this is still not possible,
reject channel request.

Change-Id: I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1
---
M src/libbsc/abis_rsl.c
1 file changed, 20 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 980b3e6..64e5c92 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1890,8 +1890,26 @@
 	 */
 	is_lu = !!(chreq_reason == GSM_CHREQ_REASON_LOCATION_UPD);
 
-	/* check availability / allocate channel */
-	lchan = lchan_alloc(bts, lctype, is_lu);
+	/* check availability / allocate channel
+	 *
+	 * - First try to allocate SDCCH.
+	 * - If SDCCH is not available, try whatever MS requested, if not SDCCH.
+	 * - If there is still no channel available, reject channel request.
+	 *
+	 * lchan_alloc() possibly tries to allocate larger lchans.
+	 *
+	 * Note: If the MS requests not TCH/H, we don't know if the phone
+	 *       supports TCH/H, so we must assign TCH/F or SDCCH.
+	 */
+	lchan = lchan_alloc(bts, GSM_LCHAN_SDCCH, 0);
+	if (!lchan && lctype != GSM_LCHAN_SDCCH) {
+		LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s "
+			"0x%x, retrying with %s\n",
+			msg->lchan->ts->trx->bts->nr,
+			gsm_lchant_name(GSM_LCHAN_SDCCH), rqd_ref->ra,
+			gsm_lchant_name(lctype));
+		lchan = lchan_alloc(bts, lctype, 0);
+	}
 	if (!lchan) {
 		LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n",
 		     msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra);

-- 
To view, visit https://gerrit.osmocom.org/5898
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list