diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-09-30 07:10:58 +0700 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2023-10-04 09:18:11 +0000 |
commit | fe005cb76e38e4ebaa4e91e29ec7f4c4ef7b8ce7 (patch) | |
tree | 8529b444ae8328665fc209b7e42e427584454dbe | |
parent | b960c7558a12c4b4eb97f6727c02c01f589b23ca (diff) |
meas: ts45008_83_is_sub(): properly handle CSD modes
Change-Id: Ic3b1e27be2dece3605657fd91d7addebb1e554e8
Related: OS#6168
-rw-r--r-- | src/common/measurement.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c index db3cdc16..96598bf0 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -19,7 +19,7 @@ /* Active TDMA frame subset for TCH/H in DTX mode (see 3GPP TS 45.008 Section 8.3). * This mapping is used to determine if a L2 block starting at the given TDMA FN * belongs to the SUB set and thus shall always be transmitted in DTX mode. */ -static const uint8_t ts45008_dtx_tchh_fn_map[104] = { +static const uint8_t ts45008_dtx_tchh_speech_fn_map[104] = { /* TCH/H(0): 0, 2, 4, 6, 52, 54, 56, 58 */ [0] = 1, /* block { 0, 2, 4, 6} */ [52] = 1, /* block {52, 54, 56, 58} */ @@ -28,6 +28,15 @@ static const uint8_t ts45008_dtx_tchh_fn_map[104] = { [66] = 1, /* block {66, 68, 70, 72} */ }; +static const uint8_t ts45008_dtx_tchh_data_fn_map[104] = { + /* UL TCH/H(0): 52, 54, 56, 58, 60, 62, 65, 67, 69, 71 */ + [52] = 1, /* block {52, 54, 56, 58, 60, 62} */ + [60] = 1, /* block {60, 62, 65, 67, 69, 71} */ + /* UL TCH/H(1): 70, 72, 74, 76, 79, 81, 83, 85, 87, 89 */ + [70] = 1, /* block {70, 72, 74, 76, 79, 81} */ + [79] = 1, /* block {79, 81, 83, 85, 87, 89} */ +}; + /* In cases where we less measurements than we expect we must assume that we * just did not receive the block because it was lost due to bad channel * conditions. We set up a dummy measurement result here that reflects the @@ -50,7 +59,7 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn) uint32_t fn104 = fn % 104; /* See TS 45.008 Sections 8.3 and 8.4 for a detailed descriptions of the rules - * implemented here. We only implement the logic for Voice, not CSD */ + * implemented here. We implement the logic for both speech and data (CSD). */ /* AMR is special, SID frames may be scheduled dynamically at any time */ if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) @@ -73,13 +82,12 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn) break; case GSM48_CMODE_DATA_12k0: /* TCH/F9.6 */ case GSM48_CMODE_DATA_6k0: /* TCH/F4.8 */ - /* FIXME: In case of data traffic channels TCH/F9.6 and TCH/F4.8 the - * RXQUAL_SUB report shall include measurements on the TDMA frames given - * in the table of subclause 8.3 only if L2 fill frames have been received - * as FACCH/F frames at the corresponding frame positions. */ + /* FIXME: The RXQUAL_SUB (not RXLEV!) report shall include measurements on + * the TDMA frames given in the table of subclause 8.3 only if L2 fill frames + * have been received as FACCH/F frames at the corresponding frame positions. */ default: if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) - return false; + return fn104 == 52; LOGPLCFN(lchan, fn, DMEAS, LOGL_ERROR, "Unsupported lchan->tch_mode %u\n", lchan->tch_mode); break; } @@ -88,7 +96,7 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn) switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_V1: case GSM48_CMODE_SPEECH_V1_VAMOS: - if (ts45008_dtx_tchh_fn_map[fn104]) + if (ts45008_dtx_tchh_speech_fn_map[fn104]) return true; break; case GSM48_CMODE_SIGN: @@ -97,13 +105,12 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn) return true; case GSM48_CMODE_DATA_6k0: /* TCH/H4.8 */ case GSM48_CMODE_DATA_3k6: /* TCH/H2.4 */ - /* FIXME: In case of data traffic channels TCH/H4.8 and TCH/H2.4 the - * RXQUAL_SUB report shall include measurements on the TDMA frames given - * in the table of subclause 8.3 only if L2 fill frames have been received - * as FACCH/H frames at the corresponding frame positions. */ + /* FIXME: The RXQUAL_SUB (not RXLEV!) report shall include measurements on + * the TDMA frames given in the table of subclause 8.3 only if L2 fill frames + * have been received as FACCH/H frames at the corresponding frame positions. */ default: if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) - return false; + return ts45008_dtx_tchh_data_fn_map[fn104] == 1; LOGPLCFN(lchan, fn, DMEAS, LOGL_ERROR, "Unsupported lchan->tch_mode %u\n", lchan->tch_mode); break; } |