From b5c23092c724cc0f75c97ce99be50fa546d52ef9 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 25 Jun 2019 19:57:35 +0700 Subject: osmo-bts-trx/trx_if.c: use osmo_loadXXbe() for TDMA FN and ToA256 Change-Id: Iec0d86f9be7243578ddc1ab322fc313cb5ac5d0b --- src/osmo-bts-trx/trx_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 28052604..0becdd57 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -611,9 +611,9 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) 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++) { -- cgit v1.2.3