dyn pdch: don't PDCH ACT if gprs mode is none
Skip PDCH activation if the GPRS mode is 'none' at:
* TCH/F_PDCH init after OML Enable (dyn_pdch_init())
* after TCH/F_PDCH is released, in TCH/F mode
* in the T3111 error timer callback after a TCH/F_PDCH was released in error
state
Assert the GPRS mode in rsl_ipacc_pdch_activate() to make sure all callers
check the GPRS mode.
Closes: OS#1765
Change-Id: I970e5f9dbcb1c625209e914a4c7696294ed34e62
diff --git a/openbsc/src/libbsc/bsc_dyn_pdch.c b/openbsc/src/libbsc/bsc_dyn_pdch.c
index e0d1a63..26409a7 100644
--- a/openbsc/src/libbsc/bsc_dyn_pdch.c
+++ b/openbsc/src/libbsc/bsc_dyn_pdch.c
@@ -34,6 +34,13 @@
if (ts->pchan != GSM_PCHAN_TCH_F_PDCH)
return;
+ if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) {
+ LOGP(DRSL, LOGL_NOTICE, "%s %s: GPRS mode is 'none':"
+ " not activating PDCH.\n",
+ gsm_ts_name(ts), gsm_pchan_name(ts->pchan));
+ return;
+ }
+
LOGP(DRSL, LOGL_DEBUG, "%s %s: trying to PDCH ACT\n",
gsm_ts_name(ts), gsm_pchan_name(ts->pchan));