Change in osmo-bts[master]: l1sap: Store status of SRR in an lchan struct memeber

laforge gerrit-no-reply at
Mon Mar 1 19:47:56 UTC 2021

laforge has submitted this change. ( )

Change subject: l1sap: Store status of SRR in an lchan struct memeber

l1sap: Store status of SRR in an lchan struct memeber

The MS sets the SRR bit in the L1 SACCH header to request DL-SACCH
repetition from the BTS. At the moment we access the l1_info stored in
tle lchan struct each time we want to check the status of the SRR bit.
However, it is more convinient to do this once at reception and store
the status of the status of the flag in a separate struct member.

Change-Id: Ieddd45d7890343d64db14b9c726f6fa2f25714f6
Related: SYS#5114
M include/osmo-bts/gsm_data.h
M src/common/l1sap.c
2 files changed, 9 insertions(+), 2 deletions(-)

  laforge: Looks good to me, approved
  Jenkins Builder: Verified

diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 6caad14..ff0c89c 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -406,6 +406,7 @@
 	struct abis_rsl_osmo_rep_acch_cap repeated_acch_capability;
 	bool repeated_dl_facch_active;
 	bool repeated_ul_sacch_active;
+	bool repeated_dl_sacch_active;
 	/* Message buffer to store DL-SACCH repeation candidate */
 	struct msgb *rep_sacch;
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0a46b23..1d80a84 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1138,10 +1138,16 @@
 				p[0] |= 0x40; /* See also: 3GPP TS 44.004, section 7.1 */
 			p[1] = lchan->rqd_ta;
 			le = &lchan->lapdm_ch.lapdm_acch;
-			if (lchan->repeated_acch_capability.dl_sacch)
+			if (lchan->repeated_acch_capability.dl_sacch) {
+				/* Check if MS requests SACCH repetition and update state accordingly */
+				if (lchan->meas.l1_info.srr_sro)
+					lchan->repeated_dl_sacch_active = true;
+				else
+					lchan->repeated_dl_sacch_active = false;
 				pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le);
-			else
+			} else {
 				pp_msg = lapdm_phsap_dequeue_msg(le);
+			}
 		} else {
 			if (lchan->ts->trx->bts->dtxd)
 				dtxd_facch = true;

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ieddd45d7890343d64db14b9c726f6fa2f25714f6
Gerrit-Change-Number: 22928
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at>
Gerrit-CC: pespin <pespin at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list