From 4a8582846281322e8d7dfc577b18767cf35c24d1 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 12 Oct 2016 16:24:32 +0200 Subject: Fix AGCH/PCH proportional allocation Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: due to current implementation quirks we activate channels before SI3 obtained, than we deactivate channels upon receiving SI3 and activate them again. This might not be necessary once we migrate to proper OML state machines. This affects lc15 and sysmo hw. Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Related: OS#1575 --- src/osmo-bts-sysmo/oml.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/osmo-bts-sysmo/oml.c') diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index b23d9924..01752d18 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1040,8 +1040,7 @@ static int mph_send_activate_req(struct gsm_lchan *lchan, struct sapi_cmd *cmd) lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx, lchan->name); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: @@ -1586,6 +1585,12 @@ static int sapi_deactivate_cb(struct gsm_lchan *lchan, int status) lchan_set_state(lchan, LCHAN_S_NONE); mph_info_chan_confirm(lchan, PRIM_INFO_DEACTIVATE, 0); + + /* 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; + lchan_activate(lchan); + } return 0; } -- cgit v1.2.3