diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-06-14 22:26:10 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-06-20 10:44:53 +0200 |
commit | a39b0f2bb7a7c8b97dc654a1ecdf3f58072a7fbb (patch) | |
tree | 401c3a3eb9b0470d80f2b9df28f85226d215ea5d /openbsc/src/abis_nm.c | |
parent | 6e0cd04725db4a3c467ca689233b904d4e9800cc (diff) |
[BSC] Implement per-timeslot ARFCN lists for frequency hopping
We now compute the Cell Channel Description for SI 1 by bit-wise
OR of the ARFCN bitmask of each timeslot on all the TRX of the BTS.
Also, support generating a GSM 04.08 Channel Description IE for
the hopping case (with HSN/MAIO instead of ARFCN).
What's still missing now: Sending the 04.08 Mobile Allocation IE
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r-- | openbsc/src/abis_nm.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index 8c6f5189a..31302f1fd 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -1976,11 +1976,23 @@ int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb) NM_OC_CHANNEL, bts->bts_nr, ts->trx->nr, ts->nr); msgb_tv_put(msg, NM_ATT_CHAN_COMB, chan_comb); - if (ts->hopping.hsn) { + if (ts->hopping.enabled) { + unsigned int i; + uint8_t *len; + msgb_tv_put(msg, NM_ATT_HSN, ts->hopping.hsn); msgb_tv_put(msg, NM_ATT_MAIO, ts->hopping.maio); - /* FIXME: compute ARFCN list */ - msgb_tlv16_put(msg, NM_ATT_ARFCN_LIST, 1, &arfcn); + + /* build the ARFCN list */ + msgb_put_u8(msg, NM_ATT_ARFCN_LIST); + len = msgb_put(msg, 1); + *len = 0; + for (i = 0; i < ts->hopping.arfcns.data_len*8; i++) { + if (bitvec_get_bit_pos(&ts->hopping.arfcns, i)) { + msgb_put_u16(msg, i); + *len += sizeof(uint16_t); + } + } } msgb_tv_put(msg, NM_ATT_TSC, bts->tsc); /* training sequence */ if (bts->type == GSM_BTS_TYPE_BS11) |