aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-07-25 11:41:08 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-07-25 12:57:22 +0200
commit6575f0c3e90ff972a98c077312116c7070567028 (patch)
treecc058f301297cf803b6621cde5ec254c5bb083bd
parenteee7247ebe0d0a54a54b53b739bdd434dfceb511 (diff)
preserve lchan-specific SI overrides on SACCH FILL
During SACCH FILL processing, update lchan SI values only for lchans which follow BTS-global default values, keeping lchan-specific overrides in place. Change-Id: I515bbd9983fa894507386b241863a9aa4d279497 Fixes: eee7247ebe0d0a54a54b53b739bdd434dfceb511 Related: OS#3173
-rw-r--r--include/osmo-bts/gsm_data_shared.h2
-rw-r--r--src/common/rsl.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index e15abfed..baa01454 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -240,6 +240,8 @@ struct gsm_lchan {
struct {
/* bitmask of all SI that are present/valid in si_buf */
uint32_t valid;
+ /* bitmask of all SI that do not mirror the BTS-global SI values */
+ uint32_t overridden;
uint32_t last;
/* buffers where we put the pre-computed SI:
SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */
diff --git a/src/common/rsl.c b/src/common/rsl.c
index e28f3130..a24c444e 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -567,14 +567,14 @@ static int rsl_rx_sacch_fill(struct gsm_bts_trx *trx, struct msgb *msg)
lapdm_ui_prefix_bts(bts, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
- /* Propagate SI change to all lchans. */
+ /* Propagate SI change to all lchans which adhere to BTS-global default. */
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)
+ if (lchan->state == LCHAN_S_NONE || (lchan->si.overridden & (1 << osmo_si)))
continue;
lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
}
@@ -588,14 +588,14 @@ static int rsl_rx_sacch_fill(struct gsm_bts_trx *trx, struct msgb *msg)
bts->si_valid &= ~(1 << osmo_si);
- /* Propagate SI change to all lchans. */
+ /* Propagate SI change to all lchans which adhere to BTS-global default. */
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)
+ if (lchan->state == LCHAN_S_NONE || (lchan->si.overridden & (1 << osmo_si)))
continue;
lchan->si.valid &= ~(1 << osmo_si);
}
@@ -1567,6 +1567,7 @@ static int rsl_rx_sacch_inf_mod(struct msgb *msg)
{
struct abis_rsl_dchan_hdr *dch = msgb_l2(msg);
struct gsm_lchan *lchan = msg->lchan;
+ struct gsm_bts *bts = lchan->ts->trx->bts;
struct tlv_parsed tp;
uint8_t rsl_si, osmo_si;
@@ -1593,7 +1594,12 @@ static int rsl_rx_sacch_inf_mod(struct msgb *msg)
}
if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) {
uint16_t len = TLVP_LEN(&tp, RSL_IE_L3_INFO);
+
lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
+ if (memcmp(GSM_BTS_SI(bts, osmo_si), TLVP_VAL(&tp, RSL_IE_L3_INFO), sizeof(sysinfo_buf_t) != 0))
+ lchan->si.overridden |= (1 << osmo_si);
+ else
+ lchan->si.overridden &= ~(1 << osmo_si);
LOGP(DRSL, LOGL_INFO, "%s Rx RSL SACCH FILLING (SI%s)\n",
gsm_lchan_name(lchan),