diff options
author | Pau Espin Pedrol <pespin@espeweb.net> | 2021-02-09 12:41:42 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@espeweb.net> | 2021-02-09 13:31:48 +0100 |
commit | d01bc3e4c73958d5305e0632774847697c454e71 (patch) | |
tree | 78ab8c2ca81b55fbca9bc0f368227568e2a99523 | |
parent | c72c853a96feafaa14fd74c5ba635a73885e7382 (diff) |
Introduce VTY cmd to configure Alpha in SI13
Related: SYS#5358
Change-Id: I8b97ea11bad5fe05f2f634945b5703ee9abde81d
-rw-r--r-- | include/osmocom/bsc/bts.h | 3 | ||||
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 19 | ||||
-rw-r--r-- | src/osmo-bsc/system_information.c | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 6797d1c70..9a226f54c 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -391,6 +391,9 @@ struct gsm_bts { bool active; /* CCN_ACTIVE */ bool forced_vty; /* set by VTY ? */ } ccn; /* TS 44.060 sec 8.8.2 */ + struct { + uint8_t alpha; /* ALPHA*10, units of 0.1, range <0-10> */ + } pwr_ctrl; /* TS 44.060 Table 12.9.1 */ } gprs; /* threshold (in percent) when BTS shall send CCCH LOAD IND */ diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 9005aab99..0388e8e24 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -761,6 +761,8 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts) if (bts->gprs.ccn.forced_vty) vty_out(vty, " gprs ccn-active %d%s", bts->gprs.ccn.active ? 1 : 0, VTY_NEWLINE); + vty_out(vty, " gprs power-control alpha %u%s", + bts->gprs.pwr_ctrl.alpha, VTY_NEWLINE); vty_out(vty, " gprs cell bvci %u%s", bts->gprs.cell.bvci, VTY_NEWLINE); for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++) @@ -3509,6 +3511,22 @@ DEFUN_USRATTR(cfg_bts_gprs_ccn_active, return CMD_SUCCESS; } +DEFUN_USRATTR(cfg_bts_gprs_pwr_ctrl_alpha, + cfg_bts_gprs_pwr_ctrl_alpha_cmd, + X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK), + "gprs power-control alpha <0-10>", + GPRS_TEXT + "GPRS Global Power Control Parameters IE (SI13)\n" + "Set alpha\n" + "alpha for MS output power control in units of 0.1 (defaults to 0)\n") +{ + struct gsm_bts *bts = vty->index; + + bts->gprs.pwr_ctrl.alpha = atoi(argv[0]); + + return CMD_SUCCESS; +} + DEFUN_USRATTR(cfg_no_bts_gprs_ctrl_ack, cfg_no_bts_gprs_ctrl_ack_cmd, X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK), @@ -7682,6 +7700,7 @@ int bsc_vty_init(struct gsm_network *network) install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd); install_element(BTS_NODE, &cfg_bts_gprs_ctrl_ack_cmd); install_element(BTS_NODE, &cfg_bts_gprs_ccn_active_cmd); + install_element(BTS_NODE, &cfg_bts_gprs_pwr_ctrl_alpha_cmd); install_element(BTS_NODE, &cfg_no_bts_gprs_ctrl_ack_cmd); install_element(BTS_NODE, &cfg_bts_gprs_bvci_cmd); install_element(BTS_NODE, &cfg_bts_gprs_cell_timer_cmd); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index d018ec37c..094c35ed7 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -1260,6 +1260,7 @@ static int generate_si13(enum osmo_sysinfo_type t, struct gsm_bts *bts) bts->gprs.ccn.active : osmo_bts_has_feature(&bts->model->features, BTS_FEAT_CCN); + si13_default.pwr_ctrl_pars.alpha = bts->gprs.pwr_ctrl.alpha; ret = osmo_gsm48_rest_octets_si13_encode(si13->rest_octets, &si13_default); if (ret < 0) |