Change in osmo-bsc[master]: lchan_select: Don't attempt to allocate CBCH sub-slots

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
Mon Sep 10 17:32:57 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/10868


Change subject: lchan_select: Don't attempt to allocate CBCH sub-slots
......................................................................

lchan_select: Don't attempt to allocate CBCH sub-slots

In case a given channel combination contains a CBCH, it
replaces the SDCCH with sub-slot 2, i.e. we cannot try to
allocate the same sub-slot for SDCCH anymore.

Change-Id: I13ea737e7f74bdef671540bd047af7eb604f3730
---
M src/osmo-bsc/lchan_select.c
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/68/10868/1

diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c
index 742c7de..a72e0c4 100644
--- a/src/osmo-bsc/lchan_select.c
+++ b/src/osmo-bsc/lchan_select.c
@@ -29,6 +29,18 @@
 
 #include <osmocom/bsc/lchan_select.h>
 
+/* return if the given lchan represents a SDCCH sub-slot that was replaced by CBCH */
+static bool lchan_is_cbch(struct gsm_lchan *lchan)
+{
+	struct gsm_bts_trx_ts *ts = lchan->ts;
+	if (ts->pchan_is == GSM_PCHAN_CCCH_SDCCH4_CBCH && lchan->nr == 2)
+		return true;
+	else if (ts->pchan_is == GSM_PCHAN_SDCCH8_SACCH8C_CBCH && lchan->nr == 2)
+		return true;
+	else
+		return false;
+}
+
 static struct gsm_lchan *
 _lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan,
 	     enum gsm_phys_chan_config as_pchan)
@@ -80,7 +92,7 @@
 
 		/* TS is (going to be) in desired pchan mode. Go ahead and check for an available lchan. */
 		ts_as_pchan_for_each_lchan(lchan, ts, as_pchan) {
-			if (lchan->fi->state == LCHAN_ST_UNUSED) {
+			if (!lchan_is_cbch(lchan) && lchan->fi->state == LCHAN_ST_UNUSED) {
 				LOGPLCHANALLOC("%s ss=%d is available%s\n",
 					       gsm_ts_and_pchan_name(ts), lchan->nr,
 					       ts->pchan_is != as_pchan ? " after dyn PCHAN change" : "");

-- 
To view, visit https://gerrit.osmocom.org/10868
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I13ea737e7f74bdef671540bd047af7eb604f3730
Gerrit-Change-Number: 10868
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180910/4c6fedd3/attachment.htm>


More information about the gerrit-log mailing list