diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 30f9c72e8..0ecb6d6ab 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2127,10 +2127,6 @@ DEFUN_USRATTR(cfg_bts_si2quater_uarfcn_add, vty_out(vty, "%% Warning: not enough space in SI2quater for a given UARFCN (%u, %u)%s", arfcn, scramble, VTY_NEWLINE); return CMD_WARNING; - case -EADDRINUSE: - vty_out(vty, "%% Unable to add UARFCN: (%u, %u) is already added%s", - arfcn, scramble, VTY_NEWLINE); - return CMD_WARNING; } return CMD_SUCCESS; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index c6928d606..58f732c93 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -302,8 +302,13 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list; - if (pos >= 0) - return -EADDRINUSE; + if (pos >= 0) { + LOGP(DRR, LOGL_NOTICE, + "EARFCN (%u, %u) is already in the list, modifying\n", + arfcn, scramble); + scl[pos] = scr; + return 0; + } if (len == MAX_EARFCN_LIST) return -ENOMEM; diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty index dbb8d2a63..ea353f254 100644 --- a/tests/si2quater_neighbor_list.vty +++ b/tests/si2quater_neighbor_list.vty @@ -148,11 +148,16 @@ OsmoBSC(config-net-bts)# show running-config ... !si2quater neighbor-list -OsmoBSC(config-net-bts)# ### Adding duplicate UARFCN is not allowed +OsmoBSC(config-net-bts)# ### UARFCN add command: UARFCN already exists OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 1 -% Unable to add UARFCN: (111, 511) is already added OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 0 -% Unable to add UARFCN: (111, 511) is already added +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add uarfcn 111 511 0 + si2quater neighbor-list add uarfcn 111 211 1 +... !si2quater neighbor-list OsmoBSC(config-net-bts)# ### FIXME: UARFCN 0 cannot be added