From 719c6a9135ae5b67e24c2d1b92d347c7ab13d545 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 6 Dec 2018 19:05:10 +0100 Subject: 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 --- src/common/rsl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/rsl.c') 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 -- cgit v1.2.3