aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-02-11 22:54:51 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2021-02-11 22:58:34 +0100
commit76308ab3fb5654be25ab4eab6497c725b172cdc0 (patch)
tree625aa7e060125e9478e984c644a49ca53569856c
parent2b3aa67a7be6edbe54d205491f29abcafd77f6c8 (diff)
l1sap.c: be sure that FACCH repetition is turned off
At the beginning of repeated_dl_facch_active_decision() the ACCH repetition capabilitiy flags (command only or all LAPDM frames) are tested. If no FACCH repetition is enabled, the function exists. However, we should also make sure that the struct memeber that enables FACCH 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: Id07091cc89352281b41532d583a8bc004477c71a Related: SYS#5114
-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 b6970f41..3de76ab4 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -980,9 +980,15 @@ void repeated_dl_facch_active_decision(struct gsm_lchan *lchan, const uint8_t *l
uint8_t lower;
uint8_t rxqual;
+ /* This is an optimization so that we exit as quickly as possible if
+ * there are no FACCH repetition capabilities present. However If the
+ * repeated FACCH capabilities vanish for whatever reason, we must be
+ * sure that FACCH repetition is disabled. */
if (!lchan->repeated_acch_capability.dl_facch_cmd
- && !lchan->repeated_acch_capability.dl_facch_all)
+ && !lchan->repeated_acch_capability.dl_facch_all) {
+ lchan->repeated_dl_facch_active = false;
return;
+ }
/* Threshold disabled (always on) */
if (lchan->repeated_acch_capability.rxqual == 0) {