<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/22928">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">l1sap: Store status of SRR in an lchan struct memeber<br><br>The MS sets the SRR bit in the L1 SACCH header to request DL-SACCH<br>repetition from the BTS. At the moment we access the l1_info stored in<br>tle lchan struct each time we want to check the status of the SRR bit.<br>However, it is more convinient to do this once at reception and store<br>the status of the status of the flag in a separate struct member.<br><br>Change-Id: Ieddd45d7890343d64db14b9c726f6fa2f25714f6<br>Related: SYS#5114<br>---<br>M include/osmo-bts/gsm_data.h<br>M src/common/l1sap.c<br>2 files changed, 9 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/28/22928/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h</span><br><span>index 05b6cf2..305a518 100644</span><br><span>--- a/include/osmo-bts/gsm_data.h</span><br><span>+++ b/include/osmo-bts/gsm_data.h</span><br><span>@@ -406,6 +406,7 @@</span><br><span>        struct abis_rsl_osmo_rep_acch_cap repeated_acch_capability;</span><br><span>  bool repeated_dl_facch_active;</span><br><span>       bool repeated_ul_sacch_active;</span><br><span style="color: hsl(120, 100%, 40%);">+        bool repeated_dl_sacch_active;</span><br><span> </span><br><span>   /* Message buffer to store DL-SACCH repeation candidate */</span><br><span>   struct msgb *rep_sacch;</span><br><span>diff --git a/src/common/l1sap.c b/src/common/l1sap.c</span><br><span>index ed7b4e7..c0bed8b 100644</span><br><span>--- a/src/common/l1sap.c</span><br><span>+++ b/src/common/l1sap.c</span><br><span>@@ -1028,7 +1028,7 @@</span><br><span>          * SACCH repetition. */</span><br><span> </span><br><span>  if (lchan->rep_sacch) {</span><br><span style="color: hsl(0, 100%, 40%);">-              if (((lchan->meas.l1_info[0] >> 1) & 1) == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+          if (lchan->repeated_dl_sacch_active == false) {</span><br><span>                   /* Toss previous repetition candidate */</span><br><span>                     msgb_free(lchan->rep_sacch);</span><br><span>                      lchan->rep_sacch = NULL;</span><br><span>@@ -1137,9 +1137,14 @@</span><br><span>                                 p[0] |= 0x40; /* See also: 3GPP TS 44.004, section 7.1 */</span><br><span>                    p[1] = lchan->rqd_ta;</span><br><span>                     le = &lchan->lapdm_ch.lapdm_acch;</span><br><span style="color: hsl(0, 100%, 40%);">-                        if (lchan->repeated_acch_capability.dl_sacch)</span><br><span style="color: hsl(120, 100%, 40%);">+                      if (lchan->repeated_acch_capability.dl_sacch) {</span><br><span style="color: hsl(120, 100%, 40%);">+                            /* Check if MS requests SACCH repetition and update state accordingly */</span><br><span style="color: hsl(120, 100%, 40%);">+                              if ((lchan->meas.l1_info[0] >> 1) & 1)</span><br><span style="color: hsl(120, 100%, 40%);">+                                   lchan->repeated_dl_sacch_active = true;</span><br><span style="color: hsl(120, 100%, 40%);">+                            else</span><br><span style="color: hsl(120, 100%, 40%);">+                                  lchan->repeated_dl_sacch_active = false;</span><br><span>                          pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le);</span><br><span style="color: hsl(0, 100%, 40%);">-                      else</span><br><span style="color: hsl(120, 100%, 40%);">+                  } else</span><br><span>                               pp_msg = lapdm_phsap_dequeue_msg(le);</span><br><span>                } else {</span><br><span>                     if (lchan->ts->trx->bts->dtxd)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/22928">change 22928</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bts/+/22928"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ieddd45d7890343d64db14b9c726f6fa2f25714f6 </div>
<div style="display:none"> Gerrit-Change-Number: 22928 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>