diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-04-19 15:20:25 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2017-05-17 18:56:24 +0200 |
commit | 67d8c72c2eab1d13bed3e8ac98338c996bf08df8 (patch) | |
tree | 4b7b566c8575468d7fcd61fd77fb7959c005f444 /src/common | |
parent | b16eed22c70602178a4a2d26aed112064c95a6d3 (diff) |
measurement: fix measurement reporting period
The measurement reporting for the MS on a SDCCH lacks some of
the periods, defined in 3GPP TS 45.008, section 8.4.2. This
adds the missing conditions by adding complete lookup tables.
Change-Id: I23fba50f48415314da40cf5bf86fce2ed3e66af6
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/measurement.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c index 80764133..6b06138d 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -55,11 +55,43 @@ static const uint8_t tchh1_meas_rep_fn104[] = { [7] = 90, }; +/* Measurment reporting period for SDCCH8 and SDCCH4 chan + * As per in 3GPP TS 45.008, section 8.4.2. + * + * Logical Chan TDMA frame number + * (FN) modulo 102 + * + * SDCCH/8 12 to 11 + * SDCCH/4 37 to 36 + */ + +/* Added interleve offset to Meas period end Fn which + * would reduce the Meas Res msg load at Abis */ + +static const uint8_t sdcch8_meas_rep_fn102[] = { + [0] = 11 + 7, + [1] = 11 + 11, + [2] = 11 + 15, + [3] = 11 + 19, + [4] = 11 + 23, + [5] = 11 + 27, + [6] = 11 + 31, + [7] = 11 + 35 +}; + +static const uint8_t sdcch4_meas_rep_fn102[] = { + [0] = 36 + 4, + [1] = 36 + 8, + [2] = 36 + 14, + [3] = 36 + 18 +}; + + /* determine if a measurement period ends at the given frame number */ static int is_meas_complete(enum gsm_phys_chan_config pchan, unsigned int ts, unsigned int subch, uint32_t fn) { - unsigned int fn_mod; + unsigned int fn_mod = -1; const uint8_t *tbl; int rc = 0; @@ -86,13 +118,13 @@ static int is_meas_complete(enum gsm_phys_chan_config pchan, unsigned int ts, case GSM_PCHAN_SDCCH8_SACCH8C: case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: fn_mod = fn % 102; - if (fn_mod == 11) + if (sdcch8_meas_rep_fn102[subch] == fn_mod) rc = 1; break; case GSM_PCHAN_CCCH_SDCCH4: case GSM_PCHAN_CCCH_SDCCH4_CBCH: fn_mod = fn % 102; - if (fn_mod == 36) + if (sdcch4_meas_rep_fn102[subch] == fn_mod) rc = 1; break; default: |