diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-03-02 02:55:01 +0700 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-03-08 22:50:54 +0000 |
commit | 2060b5b7cc3b63b64e651d3cda5ed50b44593a05 (patch) | |
tree | 754a193733d7132e7f21e31cf4aae2d5552066e6 /src/host/trxcon/sched_lchan_desc.c | |
parent | d534d43fc16a91ccc36283c72c0f39a3742a307f (diff) |
trxcon/scheduler: refactor Downlink measurement processing
So far we used to store the sums of ToA and RSSI measurements in the
logical channel state, and after decoding of a block, we did calculate
the average. This approach works fine for xCCH and PDTCH, but when it
comes to block-diagonal interleaving (which is used on TCH/F and TCH/H
channels), the results are incorrect. The problem is that a burst on
TCH may carry 57 bits of one encoded frame and 57 bits of another.
Instead of calculating the sum of measurements on the fly, let's push
them into a circular buffer (the measurement history), and keep them
there even after decoding of a block. This would allow us to calculate
the average of N last measurements depending on the interleaving type.
A single circular buffer can hold up to 8 unique measurements, so the
recent measurements would basically override the oldest ones.
Change-Id: I211ee3314f0a284112a4deddc0e93028f4a27cef
Diffstat (limited to 'src/host/trxcon/sched_lchan_desc.c')
-rw-r--r-- | src/host/trxcon/sched_lchan_desc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index b22a18b8..1184e5be 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -31,35 +31,35 @@ /* Forward declaration of handlers */ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, - sbit_t *bits, int8_t rssi, int16_t toa256); + sbit_t *bits, const struct trx_meas_set *meas); int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, - sbit_t *bits, int8_t rssi, int16_t toa256); + sbit_t *bits, const struct trx_meas_set *meas); int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, - sbit_t *bits, int8_t rssi, int16_t toa256); + sbit_t *bits, const struct trx_meas_set *meas); int tx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); int rx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, - sbit_t *bits, int8_t rssi, int16_t toa256); + sbit_t *bits, const struct trx_meas_set *meas); int tx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); int rx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, - sbit_t *bits, int8_t rssi, int16_t toa256); + sbit_t *bits, const struct trx_meas_set *meas); int tx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); |