aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-06 09:25:48 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-06 09:26:27 +0800
commit5a3a61d88f1231af5dba96050cbc27270765ef23 (patch)
treebbd6dd1ef3d691ae8877ca005270a3b8e403a2c8 /openbsc
parent457c2a879ccc8ea9fb048a9c50c7aac4210f9ec7 (diff)
bsc_init: Allow DTXu and enable DTXd on RSL (experimental)
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 and still considered as experimental.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data.h4
-rw-r--r--openbsc/src/abis_rsl.c5
-rw-r--r--openbsc/src/bsc_init.c10
-rw-r--r--openbsc/src/bsc_vty.c12
4 files changed, 28 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 14d801459..fe021e945 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -709,6 +709,10 @@ struct gsm_network {
struct {
enum rrlp_mode mode;
} rrlp;
+
+ /* enable the DTXu and DTXd for this network */
+ int dtx_enabled;
+
int msc_prio;
};
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index d83af4a20..4827dd0e9 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -330,7 +330,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 2d92b426e..4f7e29c01 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -1153,8 +1153,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/bsc_vty.c b/openbsc/src/bsc_vty.c
index 586301596..f56440ec1 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -505,6 +505,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);
return CMD_SUCCESS;
}
@@ -1277,6 +1278,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")
+{
+ struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+ gsmnet->dtx_enabled = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
/* per-BTS configuration */
DEFUN(cfg_bts,
@@ -2285,6 +2296,7 @@ int bsc_vty_init(void)
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_bts_cmd);
install_node(&bts_node, config_write_bts);