Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on osmo-bts

This is required in order to tell MS that osmo-pcu now supports
Network Assisted Cell Change (NACC).

Other BTS are not enabled by default since NACC support is not known to
work nor tested there.

Depends: libosmocore.git Change-Id I61991266b95d0c13d51b47906cc07846e9cf1390
Related: SYS#4909
Change-Id: If91d85331d402c3ab9c32b70c2c66cd7ba6ceb28
This commit is contained in:
Pau Espin Pedrol 2020-12-14 18:15:01 +01:00 committed by laforge
parent e3d0b93986
commit 1475aac8ed
4 changed files with 33 additions and 0 deletions

View File

@ -387,6 +387,10 @@ struct gsm_bts {
uint8_t net_ctrl_ord;
bool ctrl_ack_type_use_block;
bool egprs_pkt_chan_request;
struct {
bool active; /* CCN_ACTIVE */
bool forced_vty; /* set by VTY ? */
} ccn; /* TS 44.060 sec 8.8.2 */
} gprs;
/* threshold (in percent) when BTS shall send CCCH LOAD IND */

View File

@ -758,6 +758,9 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
bts->gprs.net_ctrl_ord, VTY_NEWLINE);
if (!bts->gprs.ctrl_ack_type_use_block)
vty_out(vty, " gprs control-ack-type-rach%s", VTY_NEWLINE);
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 cell bvci %u%s", bts->gprs.cell.bvci,
VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++)
@ -3486,6 +3489,24 @@ DEFUN_USRATTR(cfg_bts_gprs_ctrl_ack,
return CMD_SUCCESS;
}
DEFUN_USRATTR(cfg_bts_gprs_ccn_active,
cfg_bts_gprs_ccn_active_cmd,
X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
"gprs ccn-active (0|1|default)",
GPRS_TEXT
"Set CCN_ACTIVE in the GPRS Cell Options IE on the BCCH (SI13)\n"
"Disable\n" "Enable\n" "Default based on BTS type support\n")
{
struct gsm_bts *bts = vty->index;
bts->gprs.ccn.forced_vty = strcmp(argv[0], "default") != 0;
if (bts->gprs.ccn.forced_vty)
bts->gprs.ccn.active = argv[0][0] == '1';
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),
@ -7637,6 +7658,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
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_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);

View File

@ -61,6 +61,7 @@ int bts_model_sysmobts_init(void)
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_EGPRS);
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_PAGING_COORDINATION);
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_IPV6_NSVC);
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_CCN);
model_sysmobts.nm_att_tlvdef.def[NM_ATT_OSMO_NS_LINK_CFG].type = TLV_TYPE_TL16V;

View File

@ -1206,6 +1206,7 @@ static struct osmo_gsm48_si13_info si13_default = {
.pfc_supported = 0,
.dtm_supported = 0,
.bss_paging_coordination = 0,
.ccn_active = false,
},
},
.pwr_ctrl_pars = {
@ -1255,6 +1256,11 @@ static int generate_si13(enum osmo_sysinfo_type t, struct gsm_bts *bts)
else
si13_default.cell_opts.ext_info.bss_paging_coordination = 0;
si13_default.cell_opts.ext_info.ccn_active = bts->gprs.ccn.forced_vty ?
bts->gprs.ccn.active :
osmo_bts_has_feature(&bts->model->features,
BTS_FEAT_CCN);
ret = osmo_gsm48_rest_octets_si13_encode(si13->rest_octets, &si13_default);
if (ret < 0)
return ret;