diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-04-19 17:31:28 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-05-24 22:19:02 +0000 |
commit | e0fb3ae52d747b26b6487ec67c79eceaf37a125c (patch) | |
tree | 35c3d1bc566f3e605e6033b162310439be647139 /src/common/measurement.c | |
parent | 27b022e0c461465995a8f834fadc7a58b37ddf26 (diff) |
measurement: exclude idle channels from uplink measurement
The DATA-IND, received from the physical layer does not only include the actual
uplink data. It also includes the frames which are received when the channel
is idle (which is just noise). This would falsify the measurement results.
Depending on the BTS model, the phy may also filter the idle frames and not
send a DATA-IND at all, when the channel is idle. If this is the case, the
measurement period end can not be detected properly.
The idle frames are located at the very end of each measurement period. In
order to fix the issue, the measurement perioud has to end early. For TCH/F and
TCH/H 1, one frame has to be skipped. For TCH/H 0 two frames are skipped.
Example: For a TCH/F in TS0, the Measurement perioud would end at frame number
103. However, 103 is reserverd as idle frame. So we need to detect the end of
the measurement period at frame number 103 (-1).
Change-Id: I471a767c7974bdacadc3233d0c3e7b7965f6eafa
Diffstat (limited to 'src/common/measurement.c')
-rw-r--r-- | src/common/measurement.c | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c index 260304af..22ab27c0 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -24,35 +24,40 @@ * 7 6 and 7 91 to 90 103, 25, 51, 77 */ /* measurement period ends at fn % 104 == ? */ +/* Added (-1) offset in DATA-IND frame number to align with Meas period ends */ static const uint8_t tchf_meas_rep_fn104[] = { - [0] = 103, - [1] = 12, - [2] = 25, - [3] = 38, - [4] = 51, - [5] = 64, - [6] = 77, - [7] = 90, + [0] = 103 - 1, + [1] = 12 - 1, + [2] = 25 - 1, + [3] = 38 - 1, + [4] = 51 - 1, + [5] = 64 - 1, + [6] = 77 - 1, + [7] = 90 - 1, }; + +/* Added (-2) offset in DATA-IND frame number to align with Meas period ends */ static const uint8_t tchh0_meas_rep_fn104[] = { - [0] = 103, - [1] = 103, - [2] = 25, - [3] = 25, - [4] = 51, - [5] = 51, - [6] = 77, - [7] = 77, + [0] = 103 - 2, + [1] = 103 - 2, + [2] = 25 - 2, + [3] = 25 - 2, + [4] = 51 - 2, + [5] = 51 - 2, + [6] = 77 - 2, + [7] = 77 - 2, }; + +/* Added (-1) offset in DATA-IND frame number to align with Meas period ends */ static const uint8_t tchh1_meas_rep_fn104[] = { - [0] = 12, - [1] = 12, - [2] = 38, - [3] = 38, - [4] = 64, - [5] = 64, - [6] = 90, - [7] = 90, + [0] = 12 - 1, + [1] = 12 - 1, + [2] = 38 - 1, + [3] = 38 - 1, + [4] = 64 - 1, + [5] = 64 - 1, + [6] = 90 - 1, + [7] = 90 - 1, }; /* Measurment reporting period for SDCCH8 and SDCCH4 chan |