diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-06 02:06:23 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-06 04:38:28 +0200 |
commit | d63690e473e128aac1f027d738c44fdcaec566e0 (patch) | |
tree | 766d7a1e0fd24573ba00a30b19cd2d42ffa3b920 /src/osmo-bsc/gsm_04_08_rr.c | |
parent | b77c5eb0bc5d2b4a64ff98eb61817f14f2076fb5 (diff) |
[hopping] gsm48_send_rr_ass_cmd(): use Cell Channel Description from SI1
Calling generate_cell_chan_list() on each Assignment Command is
quite expensive, because this function basically re-constructs
the Cell Allocation (using bitvec API) and the Frequency List
from scratch. This IE can be borrowed from pre-calculated
SI1 message, so let's do this.
Change-Id: I9c8c5ae9059ff096765412b3f3c7181a94163afc
Diffstat (limited to 'src/osmo-bsc/gsm_04_08_rr.c')
-rw-r--r-- | src/osmo-bsc/gsm_04_08_rr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index a44812618..4a47c6675 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -592,9 +592,11 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, /* Cell Channel Description (freq. hopping), TV (see 3GPP TS 44.018, 10.5.2.1b) */ if (lchan->ts->hopping.enabled) { - uint8_t *chan_desc = msgb_put(msg, 1 + 16); /* tag + fixed length */ - generate_cell_chan_list(chan_desc + 1, dest_lchan->ts->trx->bts); - chan_desc[0] = GSM48_IE_CELL_CH_DESC; + const struct gsm48_system_information_type_1 *si1 = \ + GSM_BTS_SI(lchan->ts->trx->bts, 1); + msgb_tv_fixed_put(msg, GSM48_IE_CELL_CH_DESC, + sizeof(si1->cell_channel_description), + si1->cell_channel_description); } msgb_tv_put(msg, GSM48_IE_CHANMODE_1, lchan->tch_mode); |