summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-21 20:55:14 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-21 21:33:28 +0200
commit82c8f75f7118f9be3550ee1d35914376eab22211 (patch)
treec2fed48e20cc0d1f559f01a065ce0dd505d53ca9
parent241bda03b4017fa4ac2a38ad9f37685bfbc81ee7 (diff)
dyn PDCH: enable PDCH only after release due to error
In rsl_rx_rf_chan_rel_ack(), only activate PDCH when in NONE state. For the case of REL_ERR state, do the PDCH activation in the error timeout callback after T3111 is done. Change-Id: I4c55479b252a12039bb3d8c30a9cbf0199ca410e
-rw-r--r--openbsc/src/libbsc/abis_rsl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index fc5686283..db78fe328 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -644,6 +644,10 @@ static void error_timeout_cb(void *data)
/* go back to the none state */
LOGP(DRSL, LOGL_INFO, "%s is back in operation.\n", gsm_lchan_name(lchan));
rsl_lchan_set_state(lchan, LCHAN_S_NONE);
+
+ /* Put PDCH channel back into PDCH mode */
+ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH)
+ rsl_ipacc_pdch_activate(lchan->ts, 1);
}
static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan);
@@ -761,7 +765,8 @@ static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan)
do_lchan_free(lchan);
/* Put PDCH channel back into PDCH mode first */
- if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH)
+ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
+ && lchan->state == LCHAN_S_NONE)
return rsl_ipacc_pdch_activate(lchan->ts, 1);
return 0;