From eee7247ebe0d0a54a54b53b739bdd434dfceb511 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 24 Jul 2018 19:24:37 +0200 Subject: update sysinfo copies in all lchans upon SACCH FILL When a SACCH FILL is received, loop over all lchans and update their copies of system information data. This change makes BTS_Tests.TC_sacch_multi_chg pass. Change-Id: I3e63eeb5fcf320fb029de16e4d327e153cc34567 Related: OS#3173 --- src/common/rsl.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/common/rsl.c') diff --git a/src/common/rsl.c b/src/common/rsl.c index 92952408..e28f3130 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -563,12 +563,44 @@ static int rsl_rx_sacch_fill(struct gsm_bts_trx *trx, struct msgb *msg) } if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) { uint16_t len = TLVP_LEN(&tp, RSL_IE_L3_INFO); + struct gsm_bts_trx *t; + lapdm_ui_prefix_bts(bts, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len); + /* Propagate SI change to all lchans. */ + llist_for_each_entry(t, &bts->trx_list, list) { + int i, j; + for (i = 0; i < ARRAY_SIZE(t->ts); i++) { + struct gsm_bts_trx_ts *ts = &t->ts[i]; + for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) { + struct gsm_lchan *lchan = &ts->lchan[j]; + if (lchan->state == LCHAN_S_NONE) + continue; + lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len); + } + } + } + LOGP(DRSL, LOGL_INFO, " Rx RSL SACCH FILLING (SI%s, %u bytes)\n", get_value_string(osmo_sitype_strs, osmo_si), len); } else { + struct gsm_bts_trx *t; + bts->si_valid &= ~(1 << osmo_si); + + /* Propagate SI change to all lchans. */ + llist_for_each_entry(t, &bts->trx_list, list) { + int i, j; + for (i = 0; i < ARRAY_SIZE(t->ts); i++) { + struct gsm_bts_trx_ts *ts = &t->ts[i]; + for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) { + struct gsm_lchan *lchan = &ts->lchan[j]; + if (lchan->state == LCHAN_S_NONE) + continue; + lchan->si.valid &= ~(1 << osmo_si); + } + } + } LOGP(DRSL, LOGL_INFO, " Rx RSL Disabling SACCH FILLING (SI%s)\n", get_value_string(osmo_sitype_strs, osmo_si)); } -- cgit v1.2.3