aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-07-28 11:55:37 +0200
committerHarald Welte <laforge@gnumonks.org>2016-09-17 10:00:58 +0000
commit292ec58e6730c013026f20578a40e1ff48b35688 (patch)
tree8643d479b752e190a7a27212c0507cfbc399b58b
parent2867f883a11388bb04c1a5177b279c1cc74eafe4 (diff)
Modify SI 13 field for control_ack_type
Add vty function to explicitly set use of 4xRACH type of ack message for PACKET CONTROL ACKNOWLEDGMENT. Previous hardcoded value (use RLC/MAC control block) 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
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h1
-rw-r--r--openbsc/include/openbsc/rest_octets.h1
-rw-r--r--openbsc/src/libbsc/bsc_vty.c38
-rw-r--r--openbsc/src/libbsc/rest_octets.c4
-rw-r--r--openbsc/src/libbsc/system_information.c4
-rw-r--r--openbsc/src/libcommon/gsm_data.c1
6 files changed, 47 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index ce2e9b713..7c8fb5906 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -714,6 +714,7 @@ struct gsm_bts {
struct gsm_bts_gprs_nsvc nsvc[2];
uint8_t rac;
uint8_t net_ctrl_ord;
+ bool ctrl_ack_type_use_block;
} gprs;
/* RACH NM values */
diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h
index b316228a1..3b4e598bf 100644
--- a/openbsc/include/openbsc/rest_octets.h
+++ b/openbsc/include/openbsc/rest_octets.h
@@ -89,6 +89,7 @@ struct gprs_cell_options {
uint32_t drx_timer_max;/* in seconds */
uint32_t bs_cv_max;
uint8_t supports_egprs_11bit_rach;
+ bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */
uint8_t ext_info_present;
struct {
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 8116af1ab..f856e30e6 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -455,6 +455,8 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
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_use_block)
+ 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++)
@@ -2685,6 +2687,40 @@ DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd,
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_use_block = false;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_no_bts_gprs_ctrl_ack, cfg_no_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_use_block = 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
@@ -4122,6 +4158,8 @@ int bsc_vty_init(const struct log_info *cat)
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_no_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 cd7bfd552..1a5e43525 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -618,8 +618,8 @@ static int append_gprs_cell_opt(struct bitvec *bv,
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_use_block);
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 69d2f7c8e..3f6d6b909 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -956,6 +956,7 @@ static struct gsm48_si13_info si13_default = {
.t3192 = 1500,
.drx_timer_max = 3,
.bs_cv_max = 15,
+ .ctrl_ack_type_use_block = true,
.ext_info_present = 0,
.supports_egprs_11bit_rach = 0,
.ext_info = {
@@ -1003,6 +1004,9 @@ static int generate_si13(uint8_t *output, struct gsm_bts *bts)
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_use_block =
+ bts->gprs.ctrl_ack_type_use_block;
+
/* Information about the other SIs */
si13_default.bcch_change_mark = bts->bcch_change_mark;
si13_default.cell_opts.supports_egprs_11bit_rach =
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 9d794eec9..75475db09 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -315,6 +315,7 @@ struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_typ
bts->bsic = bsic;
bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED;
bts->dtxd = false;
+ bts->gprs.ctrl_ack_type_use_block = 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;