From d11ea93e261c44d6171eebd7d268810a12e6fb74 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 9 Aug 2009 19:06:24 +0200 Subject: ensure that we use the SACCH where apropriate for RLL connections --- openbsc/src/bsc_rll.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'openbsc/src/bsc_rll.c') diff --git a/openbsc/src/bsc_rll.c b/openbsc/src/bsc_rll.c index 57e8c15ce..780a84e39 100644 --- a/openbsc/src/bsc_rll.c +++ b/openbsc/src/bsc_rll.c @@ -65,15 +65,25 @@ static void timer_cb(void *_rllr) } /* establish a RLL connection with given SAPI / priority */ -int rll_establish(struct gsm_lchan *lchan, u_int8_t link_id, +int rll_establish(struct gsm_lchan *lchan, u_int8_t sapi, void (*cb)(struct gsm_lchan *, u_int8_t, void *, enum bsc_rllr_ind), void *data) { struct bsc_rll_req *rllr = talloc_zero(tall_bsc_ctx, struct bsc_rll_req); + u_int8_t link_id; if (!rllr) return -ENOMEM; + link_id = sapi; + + /* If we are a TCH and not in signalling mode, we need to + * indicate that the new RLL connection is to be made on the SACCH */ + if ((lchan->type == GSM_LCHAN_TCH_F || + lchan->type == GSM_LCHAN_TCH_H) && + lchan->rsl_cmode != RSL_CMOD_SPD_SIGN) + link_id |= 0x40; + use_lchan(lchan); rllr->lchan = lchan; rllr->link_id = link_id; -- cgit v1.2.3