aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-16 12:02:13 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-28 10:52:22 +0800
commitf15e647cba16267e7b1248844c70df7cf61f952d (patch)
treee7d59bcfdeeaba74edfda1725b02e4ff2898ba52
parente2c1a6a33d4682f8de107f59a3ed2b5828b5ee8b (diff)
bsc_init: Allow DTXu and enable DTXd on RSL
Allow the MS to use uplink discontinous transmission by setting the right bit in the SystemInformation and set DTXd/DTXu on the RSL channel commands. This is configurable via dtx-used (0|1) on the network level..
-rw-r--r--openbsc/include/openbsc/gsm_data.h3
-rw-r--r--openbsc/src/abis_rsl.c5
-rw-r--r--openbsc/src/bsc_init.c10
-rw-r--r--openbsc/src/vty_interface.c14
4 files changed, 28 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 9cf03efa9..b2b89571e 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -678,6 +678,9 @@ struct gsm_network {
enum gsm_chan_t ctype_by_chreq[16];
+ /* enable the DTXu and DTXd for this network */
+ int dtx_enabled;
+
/* Use a TCH for handling requests of type paging any */
int pag_any_tch;
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index aa285e26b..eefdbc5a0 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -329,7 +329,10 @@ static int channel_mode_from_lchan(struct rsl_ie_chan_mode *cm,
memset(cm, 0, sizeof(cm));
/* FIXME: what to do with data calls ? */
- cm->dtx_dtu = 0x00;
+ if (lchan->ts->trx->bts->network->dtx_enabled)
+ cm->dtx_dtu = 0x03;
+ else
+ cm->dtx_dtu = 0x00;
/* set TCH Speech/Data */
cm->spd_ind = lchan->rsl_cmode;
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 037845b11..757d64158 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -1056,8 +1056,14 @@ static int bootstrap_bts(struct gsm_bts *bts)
}
/* some defaults for our system information */
- bts->si_common.cell_options.radio_link_timeout = 2; /* 12 */
- bts->si_common.cell_options.dtx = 2; /* MS shall not use upplink DTX */
+ bts->si_common.cell_options.radio_link_timeout = 7; /* 12 */
+
+ /* 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/vty_interface.c b/openbsc/src/vty_interface.c
index 314277068..6486c0d21 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -1,4 +1,4 @@
-/* OpenBSC interface to quagga VTY */
+/* ipenBSC interface to quagga VTY */
/* (C) 2009-2010 by Harald Welte <laforge@gnumonks.org>
* All Rights Reserved
*
@@ -500,6 +500,7 @@ static int config_write_net(struct vty *vty)
vty_out(vty, " timer t3117 %u%s", gsmnet->T3117, VTY_NEWLINE);
vty_out(vty, " timer t3119 %u%s", gsmnet->T3119, VTY_NEWLINE);
vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE);
+ vty_out(vty, " use-dtx %u%s", gsmnet->dtx_enabled, VTY_NEWLINE);
vty_out(vty, " ipacc rtp_payload %u%s", gsmnet->rtp_payload, VTY_NEWLINE);
vty_out(vty, " rtp base %u%s", gsmnet->rtp_base_port, VTY_NEWLINE);
@@ -1468,6 +1469,16 @@ DECLARE_TIMER(3117, "Currently not used.")
DECLARE_TIMER(3119, "Currently not used.")
DECLARE_TIMER(3141, "Currently not used.")
+DEFUN(cfg_net_dtx,
+ cfg_net_dtx_cmd,
+ "dtx-used (0|1)",
+ "Enable the usage of DTX.\n"
+ "DTX is enabled/disabled")
+{
+ gsmnet->dtx_enabled = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
/* per-BTS configuration */
DEFUN(cfg_bts,
cfg_bts_cmd,
@@ -2241,6 +2252,7 @@ int bsc_vty_init(struct gsm_network *net)
install_element(GSMNET_NODE, &cfg_net_T3117_cmd);
install_element(GSMNET_NODE, &cfg_net_T3119_cmd);
install_element(GSMNET_NODE, &cfg_net_T3141_cmd);
+ install_element(GSMNET_NODE, &cfg_net_dtx_cmd);
install_element(GSMNET_NODE, &cfg_net_bsc_token_cmd);
install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd);
install_element(GSMNET_NODE, &cfg_net_msc_ip_cmd);