diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-16 12:02:13 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-28 10:52:22 +0800 |
commit | f15e647cba16267e7b1248844c70df7cf61f952d (patch) | |
tree | e7d59bcfdeeaba74edfda1725b02e4ff2898ba52 /openbsc/src | |
parent | e2c1a6a33d4682f8de107f59a3ed2b5828b5ee8b (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..
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/abis_rsl.c | 5 | ||||
-rw-r--r-- | openbsc/src/bsc_init.c | 10 | ||||
-rw-r--r-- | openbsc/src/vty_interface.c | 14 |
3 files changed, 25 insertions, 4 deletions
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); |