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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: dyn PDCH: chan_nr_by_sapi(): handle TCH/F_PDCH according to ts->flags
......................................................................
dyn PDCH: chan_nr_by_sapi(): handle TCH/F_PDCH according to ts->flags
According to the PDCH Active flag, handle a TS as TCH/F or PDCH.
Change-Id: I06ca26a99f052c6a2ae953fe355fd1196f66e501
---
M src/osmo-bts-sysmo/l1_if.c
1 file changed, 15 insertions(+), 3 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 14de251..0330308 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -611,11 +611,23 @@
return l1sap_up(trx, &l1sap);
}
-static uint8_t chan_nr_by_sapi(enum gsm_phys_chan_config pchan,
+static enum gsm_phys_chan_config pick_pchan(struct gsm_bts_trx_ts *ts)
+{
+ if (ts->pchan != GSM_PCHAN_TCH_F_PDCH)
+ return ts->pchan;
+ if (ts->flags & TS_F_PDCH_ACTIVE)
+ return GSM_PCHAN_PDCH;
+ return GSM_PCHAN_TCH_F;
+}
+
+static uint8_t chan_nr_by_sapi(struct gsm_bts_trx_ts *ts,
GsmL1_Sapi_t sapi, GsmL1_SubCh_t subCh,
uint8_t u8Tn, uint32_t u32Fn)
{
uint8_t cbits = 0;
+ enum gsm_phys_chan_config pchan = pick_pchan(ts);
+ OSMO_ASSERT(pchan != GSM_PCHAN_TCH_F_PDCH);
+
switch (sapi) {
case GsmL1_Sapi_Bcch:
cbits = 0x10;
@@ -724,7 +736,7 @@
uint32_t fn;
/* check if primitive should be handled by common part */
- chan_nr = chan_nr_by_sapi(trx->ts[rts_ind->u8Tn].pchan, rts_ind->sapi,
+ chan_nr = chan_nr_by_sapi(&trx->ts[rts_ind->u8Tn], rts_ind->sapi,
rts_ind->subCh, rts_ind->u8Tn, rts_ind->u32Fn);
if (chan_nr) {
fn = rts_ind->u32Fn;
@@ -848,7 +860,7 @@
uint32_t fn;
int rc = 0;
- chan_nr = chan_nr_by_sapi(trx->ts[data_ind->u8Tn].pchan, data_ind->sapi,
+ chan_nr = chan_nr_by_sapi(&trx->ts[data_ind->u8Tn], data_ind->sapi,
data_ind->subCh, data_ind->u8Tn, data_ind->u32Fn);
if (!chan_nr) {
LOGP(DL1C, LOGL_ERROR, "PH-DATA-INDICATION for unknown sapi "
--
To view, visit https://gerrit.osmocom.org/308
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I06ca26a99f052c6a2ae953fe355fd1196f66e501
Gerrit-PatchSet: 3
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