aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-06 19:05:10 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-23 10:22:25 +0000
commit719c6a9135ae5b67e24c2d1b92d347c7ab13d545 (patch)
treeaf0b3d5e011e2326dcf9a5cdd854b3968559a733 /src/common/rsl.c
parent8564ececa58741d9117c175d5b4324403e9579b6 (diff)
rsl: Send PDCH ACT NACK if TCH chan is still active
Fix recent commit which broke TTCN3 BTS_tests TC_dyn_ipa_pdch_tchf_act_pdch_act_nack. Prior to the breaking commit, logic was still not good, because 1- It didn't return after sending the NACK 2- It sent a NACK in all cases, while for PDCH DEACT we want to force its deactivation. Going through tests it can be seen that indeed it can deactivate it in that case: rsl.c:2206 (bts=0,trx=0,ts=3,pchan=TCH/F_PDCH as PDCH) Request to PDCH DEACT, but lchan is still in state ACTIVE ... rsl.c:2103 (bts=0,trx=0,ts=3,ss=0) Tx PDCH DEACT ACK Fixes: 133a3d96dc07ebda4dfc7899dab9c0d0c80c9fea ("rsl: Avoid sending ipa PDCH DEACT NACK followed by ACK") Change-Id: I6d6d12aec10c801fe55012ca6e58d0bc8755b15d
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 507e8aaf..61bf6a18 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2204,6 +2204,12 @@ static void rsl_rx_dyn_pdch(struct msgb *msg, bool pdch_act)
"%s Request to PDCH %s, but lchan is still in state %s\n",
gsm_ts_and_pchan_name(ts), pdch_act? "ACT" : "DEACT",
gsm_lchans_name(lchan->state));
+ /* TCH takes preference over PDCH so allow forcing PDCH DEACT,
+ * but forbid forcing PDCH ACT if lchan still active */
+ if (pdch_act) {
+ rsl_tx_dyn_pdch_nack(lchan, pdch_act, RSL_ERR_NORMAL_UNSPEC);
+ return;
+ }
}
ts->flags |= pdch_act? TS_F_PDCH_ACT_PENDING