diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2016-07-23 19:49:58 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2016-07-28 11:55:03 +0200 |
commit | cf7933892a995db7c02a3421df90c84556c38776 (patch) | |
tree | 21a9af5ff10f3ededa39ff62f5f779dcca2a01ca /openbsc/src | |
parent | e2eb5cb6a11c484ecfb77c917c11db2820c263ab (diff) |
prepare dyn TS: act lchan: fetch the channel mode a bit later
Dyn TS will add a new type of chan activation, which does not need a Channel
Mode IE. Incidentally, the dyn PDCH also doesn't need this IE if it opts for
sending a PDCH ACT instead. So it makes sense to compose the Channel Mode IE
only after the dynamic decisions are done.
Change-Id: I66d88ad6a4ae7bee1e552960fd4e92aff953125c
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/libbsc/abis_rsl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index e50e332c0..b75c3f355 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -446,14 +446,6 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type, struct rsl_ie_chan_mode cm; struct gsm48_chan_desc cd; - rc = channel_mode_from_lchan(&cm, lchan); - if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, - "%s Cannot find channel mode from lchan type\n", - gsm_ts_and_pchan_name(lchan->ts)); - return rc; - } - /* If a TCH_F/PDCH TS is in PDCH mode, deactivate PDCH first. */ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH && (lchan->ts->flags & TS_F_PDCH_ACTIVE)) { @@ -463,6 +455,14 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type, return rsl_ipacc_pdch_activate(lchan->ts, 0); } + rc = channel_mode_from_lchan(&cm, lchan); + if (rc < 0) { + LOGP(DRSL, LOGL_ERROR, + "%s Cannot find channel mode from lchan type\n", + gsm_ts_and_pchan_name(lchan->ts)); + return rc; + } + rsl_lchan_set_state(lchan, LCHAN_S_ACT_REQ); ta = lchan->rqd_ta; |