pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32285 )
Change subject: osmo-bts-virtual: properly activate [CBCH/]BCCH/CCCH ......................................................................
osmo-bts-virtual: properly activate [CBCH/]BCCH/CCCH
In change 8e04613e I overlooked that osmo-bts-virtual is re-using the scheduler of osmo-bts-trx and forgot to update its OML logic. As a result, osmo-bts-virtual is broken and does not transmit anything on the broadcast channels.
Change-Id: I2276f7e5e4042e56ddf1fd1642c917dba0005ac4 Fixes: 8e04613e "osmo-bts-trx: properly activate [CBCH/]BCCH/CCCH" Related: OS#6001, OS#1572 --- M src/osmo-bts-virtual/bts_model.c M src/osmo-bts-virtual/l1_if.c 2 files changed, 38 insertions(+), 8 deletions(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/src/osmo-bts-virtual/bts_model.c b/src/osmo-bts-virtual/bts_model.c index eb71138..5ea517e 100644 --- a/src/osmo-bts-virtual/bts_model.c +++ b/src/osmo-bts-virtual/bts_model.c @@ -125,6 +125,28 @@ if (trx_sched_set_pchan(ts, pchan) != 0) return NM_NACK_RES_NOTAVAIL;
+ /* activate lchans for [CBCH/]BCCH/CCCH */ + switch (pchan) { + case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: + /* using RSL_CHAN_OSMO_CBCH4 is correct here, because the scheduler + * does not distinguish between SDCCH/4+CBCH abd SDCCH/8+CBCH. */ + trx_sched_set_lchan(&ts->lchan[CBCH_LCHAN], + RSL_CHAN_OSMO_CBCH4, LID_DEDIC, true); + break; + case GSM_PCHAN_CCCH_SDCCH4_CBCH: + trx_sched_set_lchan(&ts->lchan[CBCH_LCHAN], + RSL_CHAN_OSMO_CBCH4, LID_DEDIC, true); + /* fall-through */ + case GSM_PCHAN_CCCH_SDCCH4: + case GSM_PCHAN_CCCH: + trx_sched_set_bcch_ccch(&ts->lchan[CCCH_LCHAN], true); + ts->lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML; + lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE); + break; + default: + break; + } + return 0; }
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 469e84f..6410d9d 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -192,14 +192,6 @@ if (vbts_sched_start(pinst->trx->bts) < 0) return -ENOLINK;
- /* Only start the scheduler for the transceiver on C0. - * If we have multiple transceivers, CCCH is always on C0 - * and has to be auto active */ - pinst->trx->ts[0].lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML; - - /* Other TRX are activated via OML by a PRIM_INFO_MODIFY / PRIM_INFO_ACTIVATE */ - lchan_set_state(&pinst->trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_ACTIVE); - return 0; }