si2quater: bts_uarfcn_add(): modify existsing UARFCNs
Do not print an error, modify the existsing UARFCNs instead. Change-Id: Iadc884aa8968e2dc01adf26ba68ba9597fa05d94 Related: SYS#6401changes/01/32201/3
parent
a60d74ba9c
commit
117c699107
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue