From 6664f47ad71f8f400df3e9e7a01007d292d7d063 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 11 Feb 2021 23:19:55 +0100 Subject: [PATCH] l1sap: be sure that UL-SACCH repetition is turned off At the beginning of repeated_ul_sacch_active_decision() The UL-SACCH repetition capability is tested. If no UL-SACCH repetition is enabled the function exits. However, we should also make sure that the struct member that enabled UL-SACCH repetition on the lower level is set to false as well. Normally that should be the case because it was never set to true before, but it is better to be sure. Change-Id: I76a841514eb955b93f2114470b2c80402cf6883c Related: SYS#5114 --- src/common/l1sap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 3de76ab49..97dd6611e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1427,8 +1427,14 @@ static void repeated_ul_sacch_active_decision(struct gsm_lchan *lchan, uint16_t upper = 0; uint16_t lower = 0; - if (!lchan->repeated_acch_capability.ul_sacch) + /* This is an optimization so that we exit as quickly as possible if + * there are no uplink SACCH repetition capabilities present. + * However If the repeated UL-SACCH capabilities vanish for whatever + * reason, we must be sure that UL-SACCH repetition is disabled. */ + if (!lchan->repeated_acch_capability.ul_sacch) { + lchan->repeated_ul_sacch_active = false; return; + } /* Threshold disabled (repetition is always on) */ if (lchan->repeated_acch_capability.rxqual == 0) {