aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-16 17:28:23 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-09-16 19:38:33 +0200
commitf3161349cf0d1b309fa6b3bc6e4a21caaa53e360 (patch)
tree7bba8f7ba948c757c70f4cd33d2bef7dbf84ccfb
parentdf17af689f56ac2608f091fd9b813cc4084d42ed (diff)
Avoid sending RSL RF REL ACK if PDCH chan is disabled by administrative lock
If for whatever reason a TS stops being announced as available to the PCU (for instance because the TRX became administratively locked), the PCU will send a Release for that channel, but in that case we don't want to send an RSL RF Channel Release ACK because it was not initiated by related command from BSC. In the case of a simple PDCH timeslot (no dynamic), the behavior is already there but we don't print an error log since it's expected. In the case of a dyn osmo TS, we only need to respond to RF Channel Release when PDCH is deactivated here, but in other cases we don't need to submit anything to BSC. Change-Id: I8ae9ee450763a0e14edf950e38b64a32df14f44f
-rw-r--r--src/common/rsl.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 802e577c..919981dd 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -758,17 +758,31 @@ int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan)
gsm_ts_and_pchan_name(lchan->ts), lchan->nr);
/* well, what to do about it ... carry on and hope it's fine. */
}
- /* remember the fact that the TS is now released */
- lchan->ts->dyn.pchan_is = GSM_PCHAN_NONE;
- /* Continue to ack the release below. (This is a non-standard rel ack invented
- * specifically for GSM_PCHAN_TCH_F_TCH_H_PDCH). */
- send_rel_ack = true;
+ if (lchan->ts->dyn.pchan_want != GSM_PCHAN_PDCH) {
+ /* Continue to ack the release below. (This is a non-standard rel ack invented
+ * specifically for GSM_PCHAN_TCH_F_TCH_H_PDCH). */
+ /* remember the fact that the TS is now released */
+ lchan->ts->dyn.pchan_is = GSM_PCHAN_NONE;
+ send_rel_ack = true;
+ } else {
+ /* Administrteively locked TRX, no need to
+ inform BSC. Keep pchan_is for when we are
+ unlocked again, since lower layers are stil
+ lconfigured for PDCH but we simply annonced
+ non-availability to PCU */
+ send_rel_ack = false;
+ }
break;
case GSM_PCHAN_TCH_F_PDCH:
/* GSM_PCHAN_TCH_F_PDCH, does not require a rel ack. The caller
* l1sap_info_rel_cnf() will continue with bts_model_ts_disconnect(). */
send_rel_ack = false;
break;
+ case GSM_PCHAN_PDCH:
+ /* Release was instructed by the BTS, for instance because the TRX is
+ * administrateively Locked */
+ send_rel_ack = false;
+ break;
default:
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "PCU rel ack for unexpected lchan kind %s\n",
gsm_pchan_name(lchan->ts->pchan));