[PATCH] osmo-msc[master]: gsm_bts_trx_set_system_infos(): Disable non-existing SI

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Aug 24 17:41:00 UTC 2017


Review at  https://gerrit.osmocom.org/3624

gsm_bts_trx_set_system_infos(): Disable non-existing SI

If we previously had a given SI present/active, we must send a
zero-length BCCH FILLING for that SI type to the BTS to stop it from
further transmitting this SI.

Change-Id: I33e356e2fa3a69efac9080813e3e9ef4e6438ed1
Closes: OS#2368
---
M src/libbsc/bsc_init.c
1 file changed, 17 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/24/3624/1

diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 5f41a27..78ca2ab 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -104,8 +104,11 @@
 	struct gsm_bts *bts = trx->bts;
 	int rc, j;
 
-	DEBUGP(DRR, "SI%s: %s\n", get_value_string(osmo_sitype_strs, i),
-		osmo_hexdump(GSM_BTS_SI(bts, i), GSM_MACBLOCK_LEN));
+	if (si_len) {
+		DEBUGP(DRR, "SI%s: %s\n", get_value_string(osmo_sitype_strs, i),
+			osmo_hexdump(GSM_BTS_SI(bts, i), GSM_MACBLOCK_LEN));
+	} else
+		DEBUGP(DRR, "SI%s: OFF\n", get_value_string(osmo_sitype_strs, i));
 
 	switch (i) {
 	case SYSINFO_TYPE_5:
@@ -113,14 +116,18 @@
 	case SYSINFO_TYPE_5ter:
 	case SYSINFO_TYPE_6:
 		rc = rsl_sacch_filling(trx, osmo_sitype2rsl(i),
-				       GSM_BTS_SI(bts, i), si_len);
+				       si_len ? GSM_BTS_SI(bts, i) : NULL, si_len);
 		break;
 	case SYSINFO_TYPE_2quater:
+		if (si_len == 0) {
+			rc = rsl_bcch_info(trx, i, NULL, 0);
+			break;
+		}
 		for (j = 0; j <= bts->si2q_count; j++)
 			rc = rsl_bcch_info(trx, i, (const uint8_t *)GSM_BTS_SI2Q(bts, j), GSM_MACBLOCK_LEN);
 		break;
 	default:
-		rc = rsl_bcch_info(trx, i, GSM_BTS_SI(bts, i), si_len);
+		rc = rsl_bcch_info(trx, i, si_len ? GSM_BTS_SI(bts, i) : NULL, si_len);
 		break;
 	}
 
@@ -193,9 +200,13 @@
 
 	for (n = 0; n < n_si; n++) {
 		i = gen_si[n];
+		/* if we don't currently have this SI, we send a zero-length
+		 * RSL BCCH FILLING / SACCH FILLING * in order to deactivate
+		 * the SI, in case it might have previously been active */
 		if (!GSM_BTS_HAS_SI(bts, i))
-			continue;
-		rc = rsl_si(trx, i, si_len[i]);
+			rc = rsl_si(trx, i, 0);
+		else
+			rc = rsl_si(trx, i, si_len[i]);
 		if (rc < 0)
 			return rc;
 	}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33e356e2fa3a69efac9080813e3e9ef4e6438ed1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list