pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/34340?usp=email )
Change subject: bts-trx: Fix CCCH not enabled if BS_AG_BLKS_RES!=1 is provided by BSC ......................................................................
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 --- M src/common/rsl.c M src/osmo-bts-trx/l1_if.c 2 files changed, 37 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/34340/1
diff --git a/src/common/rsl.c b/src/common/rsl.c index b37dd43..972de85 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -630,10 +630,12 @@ 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 a1329a8..ab66094 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -90,16 +90,21 @@
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)