aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-08-27 18:52:08 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:39:02 +0200
commitd410eb9787e2667c23079b3588b702562589cd99 (patch)
treedaec665611090ac4e7aa3a5520bd9fe9c6096847 /src/osmo-bts-sysmo/l1_if.c
parent9ae5b50d786d81e1d89dfe41238bd0129fed7271 (diff)
l1sap: correctly set chan_nr on PRIM_PH_RACH / INDICATION
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.
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index e96e5fd3..295e21fe 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1088,6 +1088,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);
}