Change in ...osmo-bts[master]: osmo-bts-trx/trx_if.c: use osmo_loadXXbe() for TDMA FN and ToA256

fixeria gerrit-no-reply at lists.osmocom.org
Wed Jun 26 06:49:59 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/14591


Change subject: osmo-bts-trx/trx_if.c: use osmo_loadXXbe() for TDMA FN and ToA256
......................................................................

osmo-bts-trx/trx_if.c: use osmo_loadXXbe() for TDMA FN and ToA256

Change-Id: Iec0d86f9be7243578ddc1ab322fc313cb5ac5d0b
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/14591/1

diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 2805260..fde4d50 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -39,6 +39,9 @@
 #include <osmocom/core/talloc.h>
 #include <osmocom/core/bits.h>
 
+#include <osmocom/core/bit16gen.h>
+#include <osmocom/core/bit32gen.h>
+
 #include <osmo-bts/phy_link.h>
 #include <osmo-bts/logging.h>
 #include <osmo-bts/bts.h>
@@ -611,9 +614,9 @@
 		return -EINVAL;
 	}
 	tn = buf[0];
-	fn = (buf[1] << 24) | (buf[2] << 16) | (buf[3] << 8) | buf[4];
+	fn =  osmo_load32be(buf + 1);
 	rssi = -(int8_t)buf[5];
-	toa256 = ((int16_t)(buf[6] << 8) | buf[7]);
+	toa256 = (int16_t) osmo_load16be(buf + 6);
 
 	/* copy and convert bits {254..0} to sbits {-127..127} */
 	for (i = 0; i < burst_len; i++) {

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iec0d86f9be7243578ddc1ab322fc313cb5ac5d0b
Gerrit-Change-Number: 14591
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190626/2a73c99a/attachment-0001.html>


More information about the gerrit-log mailing list