aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-15 11:41:47 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-09-15 11:47:11 +0200
commit380831e678d0cf6721bcc8389cc760a0370f7b5a (patch)
tree22f84e84952f637de5501f7e489d200d1772795a
parentf150c256150d43cc49561b6eb4a43048ec9a53e8 (diff)
gsm 04.08: correct calculate the Cell Selection Indicator after release of all TCH and SDCCH
When the measurement bandwidth was added the calculation of the maximum length wasn't increased. Fixes: 27a887f666ad ("gsm 04.08: encode the LTE neighbors measurement bandwindth in Channel Release") Change-Id: Ic8132fd988140c34b8e0fd8349f4518fcbaecc31
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index c2f430463..a7bba0d4e 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -239,8 +239,8 @@ static void mr_config_for_ms(struct gsm_lchan *lchan, struct msgb *msg)
lchan->mr_ms_lv + 1);
}
-
-#define CELL_SEL_IND_AFTER_REL_MAX_BITS (3+MAX_EARFCN_LIST*20+1)
+#define CELL_SEL_IND_AFTER_REL_EARCFN_ENTRY (1+16+4+1+1)
+#define CELL_SEL_IND_AFTER_REL_MAX_BITS (3+MAX_EARFCN_LIST*CELL_SEL_IND_AFTER_REL_EARCFN_ENTRY+1)
#define CELL_SEL_IND_AFTER_REL_MAX_BYTES OSMO_BYTES_FOR_BITS(CELL_SEL_IND_AFTER_REL_MAX_BITS)
/* Generate a CSN.1 encoded "Cell Selection Indicator after release of all TCH and SDCCH"
@@ -263,8 +263,8 @@ static int generate_cell_sel_ind_after_rel(uint8_t *out, unsigned int out_len, c
if (e->arfcn[i] == OSMO_EARFCN_INVALID)
continue;
- /* tailroom must fit one more EARFCN (20 bits), plus the final list term bit. */
- if (bitvec_tailroom_bits(&bv) < 21) {
+ /* tailroom must fit one more EARFCN plus the final list term bit. */
+ if (bitvec_tailroom_bits(&bv) < CELL_SEL_IND_AFTER_REL_EARCFN_ENTRY + 1) {
LOGP(DRR, LOGL_NOTICE, "%s: Not enough room to store EARFCN %u in the "
"Cell Selection Indicator IE\n", gsm_bts_name(bts), e->arfcn[i]);
} else {