diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-02-11 12:52:56 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-22 16:41:25 +0200 |
commit | cd463dd72acbe2286dc33fa266ec081d75b57751 (patch) | |
tree | 46c23fa43b273de4d4f48d95754a2dbfcf8788dc /src/osmo-bts-trx/trx_if.c | |
parent | 7d684d6866e711f96a9bac37225dbe537b514401 (diff) |
TRX: Minor fixes, especially handle TOA of RACH correctly
Diffstat (limited to 'src/osmo-bts-trx/trx_if.c')
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 7d1be857..b8535e38 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -368,7 +368,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) int len; uint8_t tn; int8_t rssi; - int16_t toa; + float toa; uint32_t fn; sbit_t bits[148]; int i; @@ -384,7 +384,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) tn = buf[0]; fn = (buf[1] << 24) | (buf[2] << 16) | (buf[3] << 8) | buf[4]; rssi = (int8_t)buf[5]; - toa = (int16_t)(buf[6] << 8) | buf[7]; + toa = ((int16_t)(buf[6] << 8) | buf[7]) / 256.0F; /* copy and convert bits {254..0} to sbits {-127..127} */ for (i = 0; i < 148; i++) { @@ -403,7 +403,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) return -EINVAL; } - LOGP(DTRX, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%d ", + LOGP(DTRX, LOGL_DEBUG, "RX burst tn=%u fn=%u rssi=%d toa=%.2f ", tn, fn, rssi, toa); trx_sched_ul_burst(l1h, tn, fn, bits, rssi, toa); |