diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 247c37128..f682ffdd8 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -386,7 +386,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ u8BlockNbr = l1sap_fn2ccch_block(u32Fn); - if (u8BlockNbr >= 1) + if (u8BlockNbr >= num_agch(trx, "PH-DATA-REQ")) sapi = GsmL1_Sapi_Pch; else sapi = GsmL1_Sapi_Agch; diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index 997ccbc25..2248afc54 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -79,7 +79,8 @@ static void tx_to_virt_um(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, timeslot = tn; /* in Osmocom, AGCH is only sent on ccch block 0. no idea why. this seems to cause false GSMTAP channel * types for agch and pch. */ - if (rsl_chantype == RSL_CHAN_PCH_AGCH && l1sap_fn2ccch_block(fn) == 0) + if (rsl_chantype == RSL_CHAN_PCH_AGCH && + l1sap_fn2ccch_block(fn) >= num_agch(l1t->trx, "PH-DATA-REQ")) gsmtap_chantype = GSMTAP_CHANNEL_PCH; else gsmtap_chantype = chantype_rsl2gsmtap(rsl_chantype, chdesc->link_id); /* the logical channel type */