[VAMOS] common/oml: generalize checking BTS_FEAT_MULTI_TSC
Change-Id: Iaa5aced70e166963106c27ebdb09adaae22daea4 Related: SYS#4895, OS#4941
This commit is contained in:
parent
d8598005ce
commit
dd3b7d469e
|
@ -962,6 +962,13 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
|
||||||
/* 9.4.60 TSC */
|
/* 9.4.60 TSC */
|
||||||
if (TLVP_PRES_LEN(&tp, NM_ATT_TSC, 1)) {
|
if (TLVP_PRES_LEN(&tp, NM_ATT_TSC, 1)) {
|
||||||
ts->tsc_oml = ts->tsc = *TLVP_VAL(&tp, NM_ATT_TSC);
|
ts->tsc_oml = ts->tsc = *TLVP_VAL(&tp, NM_ATT_TSC);
|
||||||
|
if (ts->tsc != BTS_TSC(bts) &&
|
||||||
|
!osmo_bts_has_feature(bts->features, BTS_FEAT_MULTI_TSC)) {
|
||||||
|
LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: this BTS model does not "
|
||||||
|
"support TSC %u != BSIC-BCC %u\n", ts->tsc, BTS_TSC(bts));
|
||||||
|
talloc_free(tp_merged);
|
||||||
|
return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* If there is no TSC specified, use the BCC */
|
/* If there is no TSC specified, use the BCC */
|
||||||
ts->tsc_oml = ts->tsc = BTS_TSC(bts);
|
ts->tsc_oml = ts->tsc = BTS_TSC(bts);
|
||||||
|
|
|
@ -1827,21 +1827,6 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
||||||
void *obj)
|
void *obj)
|
||||||
{
|
{
|
||||||
/* FIXME: more checks if the attributes are valid */
|
/* FIXME: more checks if the attributes are valid */
|
||||||
|
|
||||||
switch (msg_type) {
|
|
||||||
case NM_MT_SET_CHAN_ATTR:
|
|
||||||
/* our L1 only supports one global TSC for all channels
|
|
||||||
* one one TRX, so we need to make sure not to activate
|
|
||||||
* channels with a different TSC!! */
|
|
||||||
if (TLVP_PRESENT(new_attr, NM_ATT_TSC) &&
|
|
||||||
TLVP_LEN(new_attr, NM_ATT_TSC) >= 1 &&
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) {
|
|
||||||
LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n",
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts));
|
|
||||||
return -NM_NACK_PARAM_RANGE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1836,21 +1836,6 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
||||||
void *obj)
|
void *obj)
|
||||||
{
|
{
|
||||||
/* FIXME: more checks if the attributes are valid */
|
/* FIXME: more checks if the attributes are valid */
|
||||||
|
|
||||||
switch (msg_type) {
|
|
||||||
case NM_MT_SET_CHAN_ATTR:
|
|
||||||
/* our L1 only supports one global TSC for all channels
|
|
||||||
* one one TRX, so we need to make sure not to activate
|
|
||||||
* channels with a different TSC!! */
|
|
||||||
if (TLVP_PRESENT(new_attr, NM_ATT_TSC) &&
|
|
||||||
TLVP_LEN(new_attr, NM_ATT_TSC) >= 1 &&
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) {
|
|
||||||
LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n",
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts));
|
|
||||||
return -NM_NACK_PARAM_RANGE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1741,20 +1741,6 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
|
||||||
void *obj)
|
void *obj)
|
||||||
{
|
{
|
||||||
/* FIXME: more checks if the attributes are valid */
|
/* FIXME: more checks if the attributes are valid */
|
||||||
|
|
||||||
switch (msg_type) {
|
|
||||||
case NM_MT_SET_CHAN_ATTR:
|
|
||||||
/* our L1 only supports one global TSC for all channels
|
|
||||||
* one one TRX, so we need to make sure not to activate
|
|
||||||
* channels with a different TSC!! */
|
|
||||||
if (TLVP_PRES_LEN(new_attr, NM_ATT_TSC, 1) &&
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC) != BTS_TSC(bts)) {
|
|
||||||
LOGP(DOML, LOGL_ERROR, "Channel TSC %u != BSIC-TSC %u\n",
|
|
||||||
*TLVP_VAL(new_attr, NM_ATT_TSC), BTS_TSC(bts));
|
|
||||||
return -NM_NACK_PARAM_RANGE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue