aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-10-23 21:48:27 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-10-26 17:53:57 +0100
commit07aa8927e1c8565696df593df010c263a1052f58 (patch)
tree708c255e0fa525ea0496af60b857f696d5be1f31 /src
parent79294134dde6e0c78ac4de128acde977b7b7dbc1 (diff)
measurement: fix expected number of measurements
The logic in measurement.c checks the amount of collected measurement values. This is done for the total amount of measurements and the amount of SUB blocks measurements. The functions that return the expected number of measurement values currently do not take into account that the mode of a TCH/F or TCH/H has an effect on the number of expected SUB blocks. (In signalling channels all blocks count as SUB). Also a TCH/H in signalling mode generates only half the amount of measurements because the blocks in signalling mode are sepreded over 6 bursts instead of 4. This also needs to be taken into account. Change-Id: I01c7b6cc908c647263ab88f6b6281c4732f88779 Related: OS#4799
Diffstat (limited to 'src')
-rw-r--r--src/common/measurement.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c
index 18055534..d5c3ee09 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -397,11 +397,16 @@ static unsigned int lchan_meas_num_expected(const struct gsm_lchan *lchan)
switch (pchan) {
case GSM_PCHAN_TCH_F:
- /* 24 for TCH + 1 for SACCH */
+ /* 24 blocks for TCH + 1 for SACCH */
return 25;
case GSM_PCHAN_TCH_H:
- /* 24 half-blocks for TCH + 1 for SACCH */
- return 25;
+ if (lchan->tch_mode == GSM48_CMODE_SIGN) {
+ /* 12 blocks for TCH + 1 for SACCH */
+ return 13;
+ } else {
+ /* 24 blocks for TCH + 1 for SACCH */
+ return 25;
+ }
case GSM_PCHAN_SDCCH8_SACCH8C:
case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
/* 2 for SDCCH + 1 for SACCH */
@@ -428,11 +433,21 @@ static unsigned int lchan_meas_sub_num_expected(const struct gsm_lchan *lchan)
switch (pchan) {
case GSM_PCHAN_TCH_F:
- /* 1 block SDCCH, 2 blocks TCH */
- return 3;
+ if (lchan->tch_mode == GSM48_CMODE_SIGN) {
+ /* 1 block SACCH, 24 blocks TCH (see note 1) */
+ return 25;
+ } else {
+ /* 1 block SACCH, 2 blocks TCH */
+ return 3;
+ }
case GSM_PCHAN_TCH_H:
- /* 1 block SDCCH, 4 half-blocks TCH */
- return 5;
+ if (lchan->tch_mode == GSM48_CMODE_SIGN) {
+ /* 1 block SACCH, 12 blocks TCH (see ynote 1) */
+ return 13;
+ } else {
+ /* 1 block SACCH, 4 blocks TCH */
+ return 5;
+ }
case GSM_PCHAN_SDCCH8_SACCH8C:
case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
/* no DTX here, all blocks must be present! */
@@ -444,6 +459,8 @@ static unsigned int lchan_meas_sub_num_expected(const struct gsm_lchan *lchan)
default:
return 0;
}
+
+ /* Note 1: In signalling mode all blocks count as SUB blocks. */
}
/* if we clip the TOA value to 12 bits, i.e. toa256=3200,