[PATCH] osmo-bts[master]: vty: Remove command for manual channel activation/deactivation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 29 19:59:05 UTC 2017


Review at  https://gerrit.osmocom.org/2791

vty: Remove command for manual channel activation/deactivation

OsmoBTS won't run without being connected to a BSC.  The BTS wouldn't
start to transmit if the BSC doesn't properly initialize it.  So if we
want to activate some channels manually for testing, we should do so
from the BSC, and not inside the BTS code.  Doing this in the BTS means
that the BSC is not aware of it and might want to use that channel for
something else meanwhile.

Osmo{BSC,NITB} has gained ability to manually activate a channel from
the VTY in Change-Id I44fc3904678eb48bd3ab1a3da8c0c265fa082e0d as can be
seen at https://gerrit.osmocom.org/2759

So let's remove the old/obsoleted code here.

Change-Id: I7ba0301b55cc283aa6a441899f84357e28a97321
---
M src/common/vty.c
1 file changed, 0 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/2791/1

diff --git a/src/common/vty.c b/src/common/vty.c
index 44c742c..de9b23f 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1050,64 +1050,6 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(bts_t_t_l_activate,
-	bts_t_t_l_activate_cmd,
-	"bts <0-0> trx <0-0> ts <0-7> lchan <0-1> activate",
-	BTS_T_T_L_STR "Manually activate a logical channel (FOR TEST USE ONLY! Will disrupt normal operation of the channel)\n")
-{
-	struct gsm_network *net = gsmnet_from_vty(vty);
-	struct gsm_lchan *lchan;
-	int rc;
-
-	lchan = resolve_lchan(net, argv, 0);
-	if (!lchan) {
-		vty_out(vty, "%% can't find BTS%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-
-	/* set channel configuration */
-	/* TODO: let user choose speech mode */
-	lchan->tch_mode = GSM48_CMODE_SPEECH_V1;
-	lchan->rsl_cmode = RSL_CMOD_SPD_SPEECH;
-	/* no encryption */
-	memset(&lchan->encr, 0, sizeof(lchan->encr));
-
-	/* activate the channel */
-	lchan->rel_act_kind = LCHAN_REL_ACT_OML;
-	rc = l1sap_chan_act(lchan->ts->trx, gsm_lchan2chan_nr(lchan), NULL);
-	if (rc < 0) {
-		vty_out(vty, "%% can't activate channel%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-
-	return CMD_SUCCESS;
-}
-
-DEFUN(bts_t_t_l_deactivate,
-	bts_t_t_l_deactivate_cmd,
-	"bts <0-0> trx <0-0> ts <0-7> lchan <0-1> deactivate",
-	BTS_T_T_L_STR "Deactivate a manually activated channel (DO NOT apply to channels activated by BSC or NITB)\n")
-{
-	struct gsm_network *net = gsmnet_from_vty(vty);
-	struct gsm_lchan *lchan;
-	int rc;
-
-	lchan = resolve_lchan(net, argv, 0);
-	if (!lchan) {
-		vty_out(vty, "%% can't find BTS%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-
-	/* deactivate the channel */
-	rc = l1sap_chan_rel(lchan->ts->trx, gsm_lchan2chan_nr(lchan));
-	if (rc < 0) {
-		vty_out(vty, "%% can't deactivate channel%s", VTY_NEWLINE);
-		return CMD_WARNING;
-	}
-
-	return CMD_SUCCESS;
-}
-
 int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat)
 {
 	cfg_trx_gsmtap_sapi_cmd.string = vty_cmd_string_from_valstr(bts, gsmtap_sapi_names,
@@ -1166,8 +1108,6 @@
 	install_element(ENABLE_NODE, &bts_t_t_l_jitter_buf_cmd);
 	install_element(ENABLE_NODE, &bts_t_t_l_loopback_cmd);
 	install_element(ENABLE_NODE, &no_bts_t_t_l_loopback_cmd);
-	install_element(ENABLE_NODE, &bts_t_t_l_activate_cmd);
-	install_element(ENABLE_NODE, &bts_t_t_l_deactivate_cmd);
 
 	install_element(CONFIG_NODE, &cfg_phy_cmd);
 	install_node(&phy_node, config_write_phy);

-- 
To view, visit https://gerrit.osmocom.org/2791
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ba0301b55cc283aa6a441899f84357e28a97321
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list