aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-09-07 18:14:57 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-09-07 18:15:03 +0200
commit1d53d231da25e63362d7b7c8132cd9e2314d0b6f (patch)
treeca319edb245be2a3b599e9034c728ca5e0a1c1b7
parentd2d938c2615bd99d3c4681a8113bf546938cc9b3 (diff)
bts-trx: Fix CCCH not enabled if BS_AG_BLKS_RES!=1 is provided by BSC
Other bts models like sysmo,lc15,oc2g properly handled rel_act_kind=LCHAN_REL_ACT_REACT under the bts_model_lchan_deactivate() implementation, but bts-trx didn't. As a result, when BCCH_INFO(SYSINFO_TYPE_3) coming from BSC (RSL) containing a different BS_AG_BLKS_RES triggers CCCH re-activation, it would only deactivate it but not re-activate it. That means no SIs were being scheduled if bts was configured with "channel-descrption bs-ag-blks-res 2" in osmo-bsc.cfg, and phones would not see the cell. Related: OS#1575 Change-Id: I61e1681fbaa2c993b529d58b581c99166b62bda3
-rw-r--r--src/common/rsl.c6
-rw-r--r--src/osmo-bts-trx/l1_if.c19
2 files changed, 16 insertions, 9 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index b37dd439..972de85a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -630,10 +630,12 @@ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg)
switch (osmo_si) {
case SYSINFO_TYPE_3:
if (trx->nr == 0 && num_agch(trx, "RSL") != 1) {
- lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]);
- /* will be reactivated by sapi_deactivate_cb() */
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]);
+ /* will be reactivated by (see OS#1575):
+ * - bts-trx: lchan_deactivate()
+ * - sysmo,lc15,oc2g: lchan_deactivate()....[async]...sapi_deactivate_cb() */
}
/* decode original SI3 Rest Octets as sent by BSC */
si_buf = (const uint8_t *) GSM_BTS_SI(bts, osmo_si);
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index a1329a82..ab660948 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -90,16 +90,21 @@ struct trx_l1h *trx_l1h_alloc(void *tall_ctx, struct phy_instance *pinst)
int bts_model_lchan_deactivate(struct gsm_lchan *lchan)
{
- if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) {
- lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
- /* FIXME: perform whatever is needed (if any) to set proper PCH/AGCH allocation according to
- 3GPP TS 44.018 Table 10.5.2.11.1 using num_agch(lchan->ts->trx, "TRX L1"); function */
- return 0;
- }
+ int rc;
/* set lchan inactive */
lchan_set_state(lchan, LCHAN_S_NONE);
- return trx_sched_set_lchan(lchan, gsm_lchan2chan_nr(lchan), LID_DEDIC, false);
+ /* Disable it on the scheduler: */
+ rc = trx_sched_set_lchan(lchan, gsm_lchan2chan_nr(lchan), LID_DEDIC, false);
+
+ /* Reactivate CCCH due to SI3 update in RSL */
+ if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) {
+ lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
+ trx_sched_set_lchan(lchan, gsm_lchan2chan_nr(lchan), LID_DEDIC, true);
+ lchan_set_state(lchan, LCHAN_S_ACTIVE);
+ return rc;
+ }
+ return rc;
}
int bts_model_lchan_deactivate_sacch(struct gsm_lchan *lchan)