aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:54 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:41:54 +0200
commitf1fb0fa3af174c605f60458388bba61ef4f40fa8 (patch)
tree006e46f78dee0ac14ffd321e0bfae344d8160096 /src/common/oml.c
parent329085a8ff2c1162a32eb617068fa5614efcde06 (diff)
parentcaa648d92e48a05e676e87b48c21cb0b151c9b4e (diff)
Merge branch '201509-trx-rebase'0.4.0
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 5f9c0a2b..6d778a53 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -590,6 +590,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, NM_OC_RADIO_CARRIER, trx);