[PATCH 10/33] l1sap: correctly set chan_nr on PRIM_PH_RACH / INDICATION

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/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Wed Aug 27 21:54:29 UTC 2014


In case of a RACH INDICATION on CCCH, we need to set CHAN_NR to
0x88 (RSL_CHAN_RACH).  In other cases, chan_nr needs to reflect
the actual logical channel (TCH/SDCCH) on whcih the handover happened.
---
 src/osmo-bts-sysmo/l1_if.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index c28e467..9c6817c 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1065,6 +1065,11 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
 	l1sap->u.rach_ind.ra = ra;
 	l1sap->u.rach_ind.acc_delay = acc_delay;
 	l1sap->u.rach_ind.fn = fn;
+	if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH ||
+	    lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4)
+		l1sap->u.rach_ind.chan_nr = 0x88;
+	else
+		l1sap->u.rach_ind.chan_nr = gsm_lchan2chan_nr(lchan);
 
 	return l1sap_up(trx, l1sap);
 }
-- 
2.1.0





More information about the OpenBSC mailing list