pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bts/+/34341?usp=email )
Change subject: rsl: Improve logic reactivating CCCH upon SI3 BS_AG_BLKS_RES change
......................................................................
rsl: Improve logic reactivating CCCH upon SI3 BS_AG_BLKS_RES change
The previous logic was wrong, since it was only reactivating the channel
if the provided BS_AG_BLKS_RES was != 1.
Example previously broken scenario:
1- osmo-bsc user sets "channel-descrption bs-ag-blks-res 2" during
osmo-bsc startup in osmo-bsc.cfg
2- osmo-bsc user uses VTY to change it to "channel-descrption
bs-ag-blks-res 1"
3- osmo-bsc user uses VTY to deploy the new config: "bts <0-255>
resend-system-information"
Step 3 would fail beforehand, ending up in a NO-OP.
Change-Id: Ibc118e11c64f04de55cb7b94d8bf2c84b431774d
---
M src/common/rsl.c
1 file changed, 37 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 972de85..5231765 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -561,6 +561,7 @@
struct gsm48_system_information_type_2quater *si2q;
struct bitvec bv;
const uint8_t *si_buf;
+ uint8_t prev_bs_ag_blks_res = 0xff; /* 0xff = unknown */
if (rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)) < 0) {
LOGPTRX(trx, DRSL, LOGL_ERROR, "%s(): rsl_tlv_parse() failed\n", __func__);
@@ -592,7 +593,8 @@
LOGP(DRSL, LOGL_INFO, " Rx RSL BCCH INFO (SI%s, %u bytes)\n",
get_value_string(osmo_sitype_strs, osmo_si), len);
- if (SYSINFO_TYPE_2quater == osmo_si) {
+ switch (osmo_si) {
+ case SYSINFO_TYPE_2quater:
si2q = (struct gsm48_system_information_type_2quater *) TLVP_VAL(&tp,
RSL_IE_FULL_BCCH_INFO);
bv.data = si2q->rest_octets;
bv.data_len = GSM_MACBLOCK_LEN;
@@ -620,7 +622,15 @@
memset(GSM_BTS_SI2Q(bts, bts->si2q_index), GSM_MACBLOCK_PADDING,
sizeof(sysinfo_buf_t));
memcpy(GSM_BTS_SI2Q(bts, bts->si2q_index), TLVP_VAL(&tp,
RSL_IE_FULL_BCCH_INFO), len);
- } else {
+ break;
+ case SYSINFO_TYPE_3:
+ /* Keep previous BS_AG_BLKS_RES, used below */
+ if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_3)) {
+ const struct gsm48_system_information_type_3 *si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3);
+ prev_bs_ag_blks_res = si3->control_channel_desc.bs_ag_blks_res;
+ }
+ /* fall-through */
+ default:
memset(bts->si_buf[osmo_si], GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t));
memcpy(bts->si_buf[osmo_si], TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len);
}
@@ -629,7 +639,9 @@
switch (osmo_si) {
case SYSINFO_TYPE_3:
- if (trx->nr == 0 && num_agch(trx, "RSL") != 1) {
+ /* If CCCH config on TS0 changed, reactivate the chan with the new config: */
+ if (trx->nr == 0 && trx->bts->c0->ts[0].lchan[CCCH_LCHAN].state !=
LCHAN_S_NONE &&
+ num_agch(trx, "RSL") != prev_bs_ag_blks_res) {
trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind =
LCHAN_REL_ACT_REACT;
lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/34341?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibc118e11c64f04de55cb7b94d8bf2c84b431774d
Gerrit-Change-Number: 34341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged