This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/21024 ) Change subject: sched_lchan_tchh: redirect FACCH measurements via BFI TCH indication ...................................................................... sched_lchan_tchh: redirect FACCH measurements via BFI TCH indication A FACCH block is spread over 6 frames. This means that two TCH blocks are skipped in favor of the FACCH. In speach mode the missing TCH blocks will emit a TCH indication anyway. Those indications carry no measurement results. Unfortunately the anpredictable behaviour of the FACCH and the asymetric block sizes create an uneaven stream of measurement results which makes processing of the measurement results rather difficult. However, the processing of the measurement results can be simplified when we even out the measurement results by redirecting the FACCH measurements via BFI TCH indications. Change-Id: Ib1f0dfe4cb03a356254503abf51e9f27d0dd2179 Related: OS#4799 --- M include/osmo-bts/scheduler.h M src/osmo-bts-trx/sched_lchan_tchh.c 2 files changed, 37 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/21024/1 diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 6bb0b9b..2536609 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -114,6 +114,7 @@ /* TCH/H */ uint8_t dl_ongoing_facch; /* FACCH/H on downlink */ uint8_t ul_ongoing_facch; /* FACCH/H on uplink */ + struct l1sched_meas_set meas_avg_facch; /* Last FACCH/H measurement sample */ /* encryption */ int ul_encr_algo; /* A5/x encry algo downlink */ diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index c7dac70..85c8a25 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -71,6 +71,7 @@ uint16_t ber10k; uint8_t is_sub = 0; uint8_t ft; + bool redirect_facch_meas = false; /* If handover RACH detection is turned on, treat this burst as an Access Burst. * Handle NOPE.ind as usually to ensure proper Uplink measurement reporting. */ @@ -128,6 +129,11 @@ * was decoded (see below), now send the second one. */ ber10k = 0; memset(&meas_avg, 0, sizeof(meas_avg)); + /* Redirect FACCH measurement values via BFI TCH indications. + * this is only valid for SPEECH mode, since in SIGNALLING no + * BFI TCH indications are generated. */ + if (rsl_cmode == RSL_CMOD_SPD_SPEECH) + redirect_facch_meas = 1; goto bfi; } @@ -262,6 +268,17 @@ fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_FACCH_H0); else fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_FACCH_H1); + + /* (see also note above). We backup the measurement values we received + * with the FACCH/H, then we invalidate the measurement value, so that + * the higher layers will not count the measurement value we hand over + * with the FACCH DATA indication. */ + if (rsl_cmode == RSL_CMOD_SPD_SPEECH) { + memcpy(&chan_state->meas_avg_facch, &meas_avg, sizeof(chan_state->meas_avg_facch)); + meas_avg.rssi = 0; + redirect_facch_meas = 1; + } + _sched_compose_ph_data_ind(l1t, bi->tn, fn_begin, chan, tch_data + amr, GSM_MACBLOCK_LEN, meas_avg.rssi, meas_avg.toa256, @@ -326,10 +343,25 @@ fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_TCH_H0); else fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_TCH_H1); - return _sched_compose_tch_ind(l1t, bi->tn, fn_begin, chan, tch_data, rc, - /* FIXME: what should we use for BFI here? */ - bfi_flag ? bi->toa256 : meas_avg.toa256, ber10k, - bfi_flag ? bi->rssi : meas_avg.rssi, is_sub); + + /* Use measurement values from the last FACCH transmission instead of + * the current one. This is only done when a previous FACCH transmission + * took out two TCH voice blocks. To maintain a constant stream of + * measurement values we redirect the measurement values we have + * received with the FACCH to the two replacement BFI TCH indications. */ + if(redirect_facch_meas) + memcpy(&meas_avg, &chan_state->meas_avg_facch, sizeof(chan_state->meas_avg_facch)); + + rc = _sched_compose_tch_ind(l1t, bi->tn, fn_begin, chan, tch_data, rc, + /* FIXME: what should we use for BFI here? */ + bfi_flag ? bi->toa256 : meas_avg.toa256, ber10k, + bfi_flag ? bi->rssi : meas_avg.rssi, is_sub); + + /* Invalidate the cached measurement value from the last FACCH. */ + if (redirect_facch_meas && chan_state->ul_ongoing_facch == 0) + chan_state->meas_avg_facch.rssi = 0; + + return rc; } /* common section for generation of TCH bursts (TCH/H and TCH/F). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib1f0dfe4cb03a356254503abf51e9f27d0dd2179 Gerrit-Change-Number: 21024 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201102/36faaf1f/attachment.htm>