From 1475aac8ed1b7e6dca09dbd5d75a9c0e77289846 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 14 Dec 2020 18:15:01 +0100 Subject: 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 --- include/osmocom/bsc/bts.h | 4 ++++ src/osmo-bsc/bsc_vty.c | 22 ++++++++++++++++++++++ src/osmo-bsc/bts_sysmobts.c | 1 + src/osmo-bsc/system_information.c | 6 ++++++ 4 files changed, 33 insertions(+) diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index b81f45fb2..6797d1c70 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -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 */ diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 478121723..03b87b44a 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -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); diff --git a/src/osmo-bsc/bts_sysmobts.c b/src/osmo-bsc/bts_sysmobts.c index e319f2cbc..f24c615bf 100644 --- a/src/osmo-bsc/bts_sysmobts.c +++ b/src/osmo-bsc/bts_sysmobts.c @@ -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; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 10b0e4df8..d018ec37c 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -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; -- cgit v1.2.3