diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-08-09 19:06:24 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-08-09 19:06:24 +0200 |
commit | d11ea93e261c44d6171eebd7d268810a12e6fb74 (patch) | |
tree | 21125757d79d4a75547335dd310d512b67323d35 /openbsc/src/bsc_rll.c | |
parent | 2ebabca32a6626a43f22b3b268f04b44f8d1d397 (diff) |
ensure that we use the SACCH where apropriate for RLL connections
Diffstat (limited to 'openbsc/src/bsc_rll.c')
-rw-r--r-- | openbsc/src/bsc_rll.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; |