Change in osmo-e1-hardware[master]: osmo_e1f.c: Fix CRC4 insertion

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Dec 19 11:21:20 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21798 )

Change subject: osmo_e1f.c: Fix CRC4 insertion
......................................................................

osmo_e1f.c: Fix CRC4 insertion

When encoding the CRC bit for Frame number 0 and 8 in the multiframe,
we must first move the CRC4 into those of the last SMF.

Change-Id: I088741fc4528f33b3b989ada0e21957456deedb6
---
M software/obsolete/osmo_e1f.c
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/software/obsolete/osmo_e1f.c b/software/obsolete/osmo_e1f.c
index cbcd0db..a4cadb2 100644
--- a/software/obsolete/osmo_e1f.c
+++ b/software/obsolete/osmo_e1f.c
@@ -208,6 +208,12 @@
 {
 	uint8_t ret = 0;
 
+	/* re-set CRC4 at start of sub-multiframe */
+	if (e1i->tx.frame_nr == 0 || e1i->tx.frame_nr == 8) {
+		e1i->tx.crc4_last_smf = e1i->tx.crc4;
+		e1i->tx.crc4 = 0;
+	}
+
 	/* according to Table 5B/G.704 - CRC-4 multiframe structure */
 	if ((e1i->tx.frame_nr % 2) == 0) {
 		/* FAS */
@@ -236,12 +242,6 @@
 			ret |= 0x20;
 	}
 
-	/* re-set CRC4 at start of sub-multiframe */
-	if (e1i->tx.frame_nr == 0 || e1i->tx.frame_nr == 8) {
-		e1i->tx.crc4_last_smf = e1i->tx.crc4;
-		e1i->tx.crc4 = 0;
-	}
-
 	/* increment frame number modulo 16 */
 	e1i->tx.frame_nr = (e1i->tx.frame_nr + 1) % 16;
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21798
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: I088741fc4528f33b3b989ada0e21957456deedb6
Gerrit-Change-Number: 21798
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201219/eff83222/attachment.htm>


More information about the gerrit-log mailing list