mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
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..
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user