summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-31 14:43:25 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-21 22:24:38 +0200
commitafe017961a971f977f814fdd96abe2b916a5d429 (patch)
treee0c57a2b5cd389d00400861300a7f8b0f36d7ba4
parent7f208378ce55e27e56ee52ea5975b37260a355aa (diff)
trigger pdch defrag on do_lchan_free()neels/dyn_pdch_defrag
-rw-r--r--openbsc/src/libbsc/abis_rsl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index db78fe328..7becb3b29 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -44,6 +44,7 @@
#include <osmocom/abis/e1_input.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/core/talloc.h>
+#include <openbsc/pdch_defrag.h>
#define RSL_ALLOC_SIZE 1024
#define RSL_ALLOC_HEADROOM 128
@@ -75,6 +76,8 @@ static void do_lchan_free(struct gsm_lchan *lchan)
lchan->ts->trx->bts->network->T3111 + 2, 0);
} else {
rsl_lchan_set_state(lchan, LCHAN_S_NONE);
+ /* defragment TCH/F+PDCH shared channels */
+ do_pdch_defrag(lchan->ts->trx->bts);
}
lchan_free(lchan);
}
@@ -645,9 +648,9 @@ static void error_timeout_cb(void *data)
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);
+ /* defragment TCH/F+PDCH shared channels */
+ do_pdch_defrag(lchan->ts->trx->bts);
+ /* TODO: Put PDCH channel back into PDCH mode? */
}
static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan);