aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c11
-rw-r--r--openbsc/src/libbsc/bsc_dyn_pdch.c7
2 files changed, 16 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 9f7628090..013daec1c 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -645,8 +645,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)
+ /* Put PDCH channel back into PDCH mode, if GPRS is enabled */
+ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
+ && lchan->ts->trx->bts->gprs.mode != BTS_GPRS_NONE)
rsl_ipacc_pdch_activate(lchan->ts, 1);
}
@@ -772,9 +773,13 @@ static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan)
* Any state other than LCHAN_S_REL_ERR became LCHAN_S_NONE after above
* do_lchan_free(). Assert this, because that's what ensures a PDCH ACT
* on a dynamic channel in all cases.
+ *
+ * If GPRS is disabled, always skip the PDCH ACT.
*/
OSMO_ASSERT(lchan->state == LCHAN_S_NONE
|| lchan->state == LCHAN_S_REL_ERR);
+ if (lchan->ts->trx->bts->gprs.mode == BTS_GPRS_NONE)
+ return 0;
if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
&& lchan->state == LCHAN_S_NONE)
return rsl_ipacc_pdch_activate(lchan->ts, 1);
@@ -2042,6 +2047,8 @@ int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act)
}
if (act){
+ /* Callers should heed the GPRS mode. */
+ OSMO_ASSERT(ts->trx->bts->gprs.mode != BTS_GPRS_NONE);
msg_type = RSL_MT_IPAC_PDCH_ACT;
ts->flags |= TS_F_PDCH_ACT_PENDING;
} else {
diff --git a/openbsc/src/libbsc/bsc_dyn_pdch.c b/openbsc/src/libbsc/bsc_dyn_pdch.c
index e0d1a6349..26409a747 100644
--- a/openbsc/src/libbsc/bsc_dyn_pdch.c
+++ b/openbsc/src/libbsc/bsc_dyn_pdch.c
@@ -34,6 +34,13 @@ void dyn_pdch_init(struct gsm_bts_trx_ts *ts)
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));