fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34595?usp=email )


Change subject: meas: ts45008_83_is_sub(): properly handle CSD modes
......................................................................

meas: ts45008_83_is_sub(): properly handle CSD modes

Change-Id: Ic3b1e27be2dece3605657fd91d7addebb1e554e8
Related: OS#6168
---
M src/common/measurement.c
1 file changed, 30 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/95/34595/1

diff --git a/src/common/measurement.c b/src/common/measurement.c
index f4faa2e..57b3148 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 @@
        [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 @@
        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 @@
                        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 @@
                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 @@
                        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;
                }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34595?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3b1e27be2dece3605657fd91d7addebb1e554e8
Gerrit-Change-Number: 34595
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to