diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-07-08 18:41:05 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-01-21 15:54:41 +0100 |
commit | e813648d9b71c058e794ba90d4a05f63bc4f6c73 (patch) | |
tree | 8ed8931f35ac1bf6e08599db60c2ed68e26c4896 | |
parent | c0fa6a93f0561fe3527a736c830365721b9ed135 (diff) |
Fix: Retrieve ARFCN (from OML) for TRX other than C0
-rw-r--r-- | src/common/oml.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/oml.c b/src/common/oml.c index c0fc53a3..4894a037 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -594,6 +594,25 @@ static int oml_rx_set_radio_attr(struct gsm_bts_trx *trx, struct msgb *msg) trx->arfcn_num = length; } else trx->arfcn_num = 0; +#else + if (trx != trx->bts->c0 && TLVP_PRESENT(&tp, NM_ATT_ARFCN_LIST)) { + const uint8_t *value = TLVP_VAL(&tp, NM_ATT_ARFCN_LIST); + uint16_t _value; + uint16_t length = TLVP_LEN(&tp, NM_ATT_ARFCN_LIST); + uint16_t arfcn; + if (length != 2) { + LOGP(DOML, LOGL_ERROR, "Expecting only one ARFCN, " + "because hopping not supported\n"); + /* FIXME: send NACK */ + return -ENOTSUP; + } + memcpy(&_value, value, 2); + arfcn = ntohs(_value); + value += 2; + if (arfcn > 1024) + return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); + trx->arfcn = arfcn; + } #endif /* call into BTS driver to apply new attributes to hardware */ return bts_model_apply_oml(trx->bts, msg, tp_merged, trx); |