aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-25 19:57:35 +0700
committerfixeria <axilirator@gmail.com>2019-06-27 05:50:17 +0000
commitb5c23092c724cc0f75c97ce99be50fa546d52ef9 (patch)
treefdbe23794ddf66e3dd148a65bbced1426e0fe0ec
parentf2271d0888e3f62b5d7b235f3b9d6bddb70825b7 (diff)
osmo-bts-trx/trx_if.c: use osmo_loadXXbe() for TDMA FN and ToA256
-rw-r--r--src/osmo-bts-trx/trx_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 2805260..0becdd5 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++) {