Change in openbsc[master]: Fix DTX indicator in 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/OpenBSC@lists.osmocom.org/.

gerrit-no-reply at lists.osmocom.org gerrit-no-reply at lists.osmocom.org
Tue May 10 15:19:12 UTC 2016


>From Max <msuraev at sysmocom.de>:

Max has uploaded a new change for review.

  https://gerrit.osmocom.org/40

Change subject: Fix DTX indicator in SI
......................................................................

Fix DTX indicator in SI

Use libsmocore function to properly set DTX value in system information
messages: the value depends on SI type.

Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4
---
M openbsc/src/libbsc/bsc_init.c
M openbsc/src/libbsc/system_information.c
2 files changed, 17 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/1

diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index fea6562..5c27862 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -458,12 +458,6 @@
 		return -EINVAL;
 	}
 
-	/* allow/disallow DTXu */
-	if (bts->network->dtx_enabled)
-		bts->si_common.cell_options.dtx = 0;
-	else
-		bts->si_common.cell_options.dtx = 2;
-
 	bts->si_common.cell_options.pwrc = 0; /* PWRC not set */
 
 	bts->si_common.cell_sel_par.acs = 0;
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index 0d96621..af3b07d 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -30,6 +30,7 @@
 #include <osmocom/core/bitvec.h>
 #include <osmocom/core/utils.h>
 #include <osmocom/gsm/sysinfo.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
 
 #include <openbsc/debug.h>
 #include <openbsc/gsm_04_08.h>
@@ -717,6 +718,14 @@
 	si3->cell_sel_par = bts->si_common.cell_sel_par;
 	si3->rach_control = bts->si_common.rach_control;
 
+	/* allow/disallow DTXu */
+	if (bts->network->dtx_enabled)
+		gsm48_set_dtx(&si3->cell_options, GSM48_MAY_USE, GSM48_MAY_USE,
+			      true);
+	else
+		gsm48_set_dtx(&si3->cell_options, GSM48_SHALL_NOT,
+			      GSM48_SHALL_NOT, true);
+
 	if ((bts->si_valid & (1 << SYSINFO_TYPE_2ter))) {
 		LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n");
 		si_info.si2ter_indicator = 1;
@@ -929,6 +938,14 @@
 	si6->cell_options = bts->si_common.cell_options;
 	si6->ncc_permitted = bts->si_common.ncc_permitted;
 
+	/* allow/disallow DTXu */
+	if (bts->network->dtx_enabled)
+		gsm48_set_dtx(&si6->cell_options, GSM48_MAY_USE, GSM48_MAY_USE,
+			      false);
+	else
+		gsm48_set_dtx(&si6->cell_options, GSM48_SHALL_NOT,
+			      GSM48_SHALL_NOT, false);
+
 	/* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */
 
 	return l2_plen;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the OpenBSC mailing list