aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-02-11 23:19:55 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2021-02-11 23:23:20 +0100
commit6664f47ad71f8f400df3e9e7a01007d292d7d063 (patch)
treec81ea9a4fc97e9a6c1f8e0976623f0dd00f39835 /src/common/l1sap.c
parent76308ab3fb5654be25ab4eab6497c725b172cdc0 (diff)
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
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 3de76ab4..97dd6611 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) {