[PATCH] openbsc[master]: Modify SI 13 field for control_ack_type

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

Max gerrit-no-reply at lists.osmocom.org
Tue Jul 26 11:22:34 UTC 2016


Hello Jenkins Builder, Holger Freyther,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/546

to look at the new patch set (#5).

Modify SI 13 field for control_ack_type

Add vty function to explicitly set type of ack message for PACKET
CONTROL ACKNOWLEDGMENT. Previous hardcoded value is used as a default.

This is handy for debugging issues related to Timing Advance in context
of GPRS.

Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336
Related: OS#1526
---
M openbsc/include/openbsc/gsm_data_shared.h
M openbsc/include/openbsc/rest_octets.h
M openbsc/src/libbsc/bsc_vty.c
M openbsc/src/libbsc/rest_octets.c
M openbsc/src/libbsc/system_information.c
M openbsc/src/libcommon/gsm_data.c
6 files changed, 45 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/46/546/5

diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 7241ff0..bfce9ec 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -711,6 +711,7 @@
 		struct gsm_bts_gprs_nsvc nsvc[2];
 		uint8_t rac;
 		uint8_t net_ctrl_ord;
+		bool ctrl_ack_type;
 	} gprs;
 
 	/* RACH NM values */
diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h
index 91413b5..ac1c52f 100644
--- a/openbsc/include/openbsc/rest_octets.h
+++ b/openbsc/include/openbsc/rest_octets.h
@@ -88,7 +88,7 @@
 	uint32_t t3192;	/* in milliseconds */
 	uint32_t drx_timer_max;/* in seconds */
 	uint32_t bs_cv_max;
-
+	bool ctrl_ack_type;
 	uint8_t ext_info_present;
 	struct {
 		uint8_t egprs_supported;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b0e8764..f814c40 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -452,6 +452,8 @@
 		VTY_NEWLINE);
 	vty_out(vty, "  gprs network-control-order nc%u%s",
 		bts->gprs.net_ctrl_ord, VTY_NEWLINE);
+	if (!bts->gprs.ctrl_ack_type)
+		vty_out(vty, "  gprs control-ack-type-rach%s", VTY_NEWLINE);
 	vty_out(vty, "  gprs cell bvci %u%s", bts->gprs.cell.bvci,
 		VTY_NEWLINE);
 	for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++)
@@ -2682,6 +2684,40 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_bts_gprs_ctrl_ack, cfg_bts_gprs_ctrl_ack_cmd,
+	"gprs control-ack-type-rach", GPRS_TEXT
+	"Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+	"four access bursts format instead of default RLC/MAC control block\n")
+{
+	struct gsm_bts *bts = vty->index;
+
+	if (bts->gprs.mode == BTS_GPRS_NONE) {
+		vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	bts->gprs.ctrl_ack_type = false;
+
+	return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_gprs_ctrl_ack, cfg_bts_gprs_ctrl_ack_cmd,
+	"no gprs control-ack-type-rach", NO_STR GPRS_TEXT
+	"Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+	"four access bursts format instead of default RLC/MAC control block\n")
+{
+	struct gsm_bts *bts = vty->index;
+
+	if (bts->gprs.mode == BTS_GPRS_NONE) {
+		vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	bts->gprs.ctrl_ack_type = true;
+
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_bts_gprs_net_ctrl_ord, cfg_bts_gprs_net_ctrl_ord_cmd,
 	"gprs network-control-order (nc0|nc1|nc2)",
 	GPRS_TEXT
@@ -4088,6 +4124,7 @@
 	install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
 	install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
 	install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd);
+	install_element(BTS_NODE, &cfg_bts_gprs_ctrl_ack_cmd);
 	install_element(BTS_NODE, &cfg_bts_gprs_bvci_cmd);
 	install_element(BTS_NODE, &cfg_bts_gprs_cell_timer_cmd);
 	install_element(BTS_NODE, &cfg_bts_gprs_nsei_cmd);
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index 065fb7b..1ee82cb 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -618,8 +618,8 @@
 	bitvec_set_uint(bv, drx_timer_max, 3);
 	/* ACCESS_BURST_TYPE: Hard-code 8bit */
 	bitvec_set_bit(bv, 0);
-	/* CONTROL_ACK_TYPE: Hard-code to RLC/MAC control block */
-	bitvec_set_bit(bv, 1);
+	/* CONTROL_ACK_TYPE: */
+	bitvec_set_bit(bv, gco->ctrl_ack_type);
 	bitvec_set_uint(bv, gco->bs_cv_max, 4);
 
 	if (0) {
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index fd228e3..c888040 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -956,6 +956,7 @@
 		.t3192		= 1500,
 		.drx_timer_max	= 3,
 		.bs_cv_max	= 15,
+		.ctrl_ack_type = true,
 		.ext_info_present = 0,
 		.ext_info = {
 			/* The values below are just guesses ! */
@@ -1002,6 +1003,8 @@
 	si13_default.no_pbcch.rac = bts->gprs.rac;
 	si13_default.no_pbcch.net_ctrl_ord = bts->gprs.net_ctrl_ord;
 
+	si13_default.cell_opts.ctrl_ack_type = bts->gprs.ctrl_ack_type;
+
 	/* Information about the other SIs */
 	si13_default.bcch_change_mark = bts->bcch_change_mark;
 
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 9d794ee..93466f6 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -315,6 +315,7 @@
 	bts->bsic = bsic;
 	bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED;
 	bts->dtxd = false;
+	bts->gprs.ctrl_ack_type = true; /* use RLC/MAC control block */
 	bts->neigh_list_manual_mode = 0;
 	bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */
 	bts->si_common.cell_sel_par.rxlev_acc_min = 0;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336
Gerrit-PatchSet: 5
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list