<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21798">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_e1f.c: Fix CRC4 insertion<br><br>When encoding the CRC bit for Frame number 0 and 8 in the multiframe,<br>we must first move the CRC4 into those of the last SMF.<br><br>Change-Id: I088741fc4528f33b3b989ada0e21957456deedb6<br>---<br>M software/obsolete/osmo_e1f.c<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/software/obsolete/osmo_e1f.c b/software/obsolete/osmo_e1f.c</span><br><span>index cbcd0db..a4cadb2 100644</span><br><span>--- a/software/obsolete/osmo_e1f.c</span><br><span>+++ b/software/obsolete/osmo_e1f.c</span><br><span>@@ -208,6 +208,12 @@</span><br><span> {</span><br><span>     uint8_t ret = 0;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+  /* re-set CRC4 at start of sub-multiframe */</span><br><span style="color: hsl(120, 100%, 40%);">+  if (e1i->tx.frame_nr == 0 || e1i->tx.frame_nr == 8) {</span><br><span style="color: hsl(120, 100%, 40%);">+           e1i->tx.crc4_last_smf = e1i->tx.crc4;</span><br><span style="color: hsl(120, 100%, 40%);">+           e1i->tx.crc4 = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* according to Table 5B/G.704 - CRC-4 multiframe structure */</span><br><span>       if ((e1i->tx.frame_nr % 2) == 0) {</span><br><span>                /* FAS */</span><br><span>@@ -236,12 +242,6 @@</span><br><span>                     ret |= 0x20;</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* re-set CRC4 at start of sub-multiframe */</span><br><span style="color: hsl(0, 100%, 40%);">-    if (e1i->tx.frame_nr == 0 || e1i->tx.frame_nr == 8) {</span><br><span style="color: hsl(0, 100%, 40%);">-             e1i->tx.crc4_last_smf = e1i->tx.crc4;</span><br><span style="color: hsl(0, 100%, 40%);">-             e1i->tx.crc4 = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    /* increment frame number modulo 16 */</span><br><span>       e1i->tx.frame_nr = (e1i->tx.frame_nr + 1) % 16;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21798">change 21798</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-e1-hardware/+/21798"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-e1-hardware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I088741fc4528f33b3b989ada0e21957456deedb6 </div>
<div style="display:none"> Gerrit-Change-Number: 21798 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>