diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-07-24 19:24:37 +0200 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-07-24 19:24:37 +0200 |
commit | eee7247ebe0d0a54a54b53b739bdd434dfceb511 (patch) | |
tree | e63d1c5ef8ff0c3d0ecb51d27a5bb7b507145dc5 /src | |
parent | ed9a13e67068e7feb28a23ecb937bb1155b4d322 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/common/rsl.c | 32 |
1 files changed, 32 insertions, 0 deletions
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)); } |