laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30401 )

Change subject: mobile: gsm_forward_mncc(): properly mark TCH/H frames
......................................................................

mobile: gsm_forward_mncc(): properly mark TCH/H frames

Change-Id: Id3f459bc767ebf31469287fa672893239c5977d9
Related: OS#5599
---
M src/host/layer23/src/mobile/voice.c
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  msuraev: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/layer23/src/mobile/voice.c 
b/src/host/layer23/src/mobile/voice.c
index 58c62d6..cb1718f 100644
--- a/src/host/layer23/src/mobile/voice.c
+++ b/src/host/layer23/src/mobile/voice.c
@@ -20,6 +20,8 @@
 #include <osmocom/core/msgb.h>
 #include <osmocom/codec/codec.h>

+#include <osmocom/gsm/protocol/gsm_08_58.h>
+
 #include <osmocom/bb/common/logging.h>
 #include <osmocom/bb/common/osmocom_data.h>
 #include <osmocom/bb/mobile/mncc.h>
@@ -37,14 +39,20 @@
                msgb_push(msg, sizeof(struct gsm_data_frame));
        mncc->callref = ms->mncc_entity.ref;

-       /* FIXME: FR, EFR only! */
        switch (ms->rrlayer.cd_now.mode) {
        case GSM48_CMODE_SPEECH_V1:
-               mncc->msg_type = GSM_TCHF_FRAME;
+       {
+               const uint8_t cbits = ms->rrlayer.cd_now.chan_nr >> 3;
+               if (cbits == ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs)
+                       mncc->msg_type = GSM_TCHF_FRAME;
+               else
+                       mncc->msg_type = GSM_TCHH_FRAME;
                break;
+       }
        case GSM48_CMODE_SPEECH_EFR:
                mncc->msg_type = GSM_TCHF_FRAME_EFR;
                break;
+       case GSM48_CMODE_SPEECH_AMR: /* TODO: no AMR support yet */
        default:
                /* TODO: print error message here */
                goto exit_free;

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30401
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id3f459bc767ebf31469287fa672893239c5977d9
Gerrit-Change-Number: 30401
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: msuraev <msur...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to