Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/2410

to look at the new patch set (#3).

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
---
M src/common/measurement.c
1 file changed, 35 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/2410/3

diff --git a/src/common/measurement.c b/src/common/measurement.c
index 8076413..6b06138 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -55,11 +55,43 @@
        [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 @@
        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:

-- 
To view, visit https://gerrit.osmocom.org/2410
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I23fba50f48415314da40cf5bf86fce2ed3e66af6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to