This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. Change subject: dyn TS: complete for TRX ...................................................................... dyn TS: complete for TRX Apply similar fixes as for TCH/F_PDCH also for TCH/F_TCH/H_PDCH: Detect dyn TS in PDCH mode in ts_is_pdch(). In trx_set_ts(), enhance the "if (TCH_F_PDCH)" to a switch statement including both dynamic channel types. Adjust the comment to include both kinds. Change-Id: I6669739cd08780cd9ffb9451cdae9f6b9704c4fe --- M src/common/l1sap.c M src/osmo-bts-trx/l1_if.c 2 files changed, 22 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 304f718..6498103 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -299,7 +299,10 @@ return ts->pchan == GSM_PCHAN_PDCH || (ts->pchan == GSM_PCHAN_TCH_F_PDCH && (ts->flags & TS_F_PDCH_ACTIVE) - && !(ts->flags & TS_F_PDCH_PENDING_MASK)); + && !(ts->flags & TS_F_PDCH_PENDING_MASK)) + || (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH + && ts->dyn.pchan_want == ts->dyn.pchan_is + && ts->dyn.pchan_is == GSM_PCHAN_PDCH); } static int to_gsmtap(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 4d6dc3f..b89a359 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -398,9 +398,10 @@ if (!(l1h->config.slotmask & (1 << tn))) return NM_NACK_RES_NOTAVAIL; - /* set physical channel. For dynamic TCH/F_PDCH, the caller should have + /* set physical channel. For dynamic timeslots, the caller should have * decided on a more specific PCHAN type already. */ OSMO_ASSERT(pchan != GSM_PCHAN_TCH_F_PDCH); + OSMO_ASSERT(pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH); rc = trx_sched_set_pchan(&l1h->l1s, tn, pchan); if (rc) return NM_NACK_RES_NOTAVAIL; @@ -426,15 +427,25 @@ static uint8_t trx_set_ts(struct gsm_bts_trx_ts *ts) { - enum gsm_phys_chan_config pchan = ts->pchan; + enum gsm_phys_chan_config pchan; - /* For dynamic TCH/F_PDCH, pick the pchan type that should currently be - * active according to TS flags. This should only be called during - * init, PDCH transitions will call trx_set_ts_as_pchan() directly. */ - OSMO_ASSERT((ts->flags & TS_F_PDCH_PENDING_MASK) == 0); - if (pchan == GSM_PCHAN_TCH_F_PDCH) + /* For dynamic timeslots, pick the pchan type that should currently be + * active. This should only be called during init, PDCH transitions + * will call trx_set_ts_as_pchan() directly. */ + switch (ts->pchan) { + case GSM_PCHAN_TCH_F_PDCH: + OSMO_ASSERT((ts->flags & TS_F_PDCH_PENDING_MASK) == 0); pchan = (ts->flags & TS_F_PDCH_ACTIVE)? GSM_PCHAN_PDCH : GSM_PCHAN_TCH_F; + break; + case GSM_PCHAN_TCH_F_TCH_H_PDCH: + OSMO_ASSERT(ts->dyn.pchan_is == ts->dyn.pchan_want); + pchan = ts->dyn.pchan_is; + break; + default: + pchan = ts->pchan; + break; + } return trx_set_ts_as_pchan(ts, pchan); } -- To view, visit https://gerrit.osmocom.org/672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6669739cd08780cd9ffb9451cdae9f6b9704c4fe Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>