fixeria has uploaded this change for review.

View Change

rsl: rsl_handle_chan_mod_ie(): set lchan->csd_mode for NT CSD

In commit 66eae187, I skipped assigning LCHAN_CSD_M_NT (0) to
lchan->csd_mode for non-transparent channel modes. I assumed that
the entire gsm_lchan struct was zero-initialized during activation
or release procedures, but this assumption was incorrect.

In fact, some lchan fields are initialized during activation, while
others are initialized during release. Specifically, lchan->csd_mode
is zero-initialized when the process starts, and then updated only
for transparent mode requests. For non-transparent mode requests,
this field is not updated, meaning it retains its previous value.

This bug caused incorrect E1/E2/E3 bit settings and missing GSMTAP
RLP output for channels that were previously used for transparent
CSD calls. This patch is fixing it.

Change-Id: I793ab4dc25fa852eade6f7a3b67ae961ceb7a093
Fixes: 66eae187 "rsl: rsl_handle_chan_mod_ie(): set lchan->csd_mode"
Related: OS#1572, OS#6579
---
M src/common/rsl.c
1 file changed, 11 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/20/38420/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index cc802c8..20581d4 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -205,37 +205,48 @@
/* If octet 4 indicates non-transparent data */
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NT_14k5):
lchan->tch_mode = GSM48_CMODE_DATA_14k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NT_12k0):
lchan->tch_mode = GSM48_CMODE_DATA_12k0;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NT_6k0):
lchan->tch_mode = GSM48_CMODE_DATA_6k0;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NT_43k5):
lchan->tch_mode = GSM48_CMODE_DATA_43k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NT_28k8):
/* 28.8 kbit/s services, 29.0 kbit/s radio interface rate */
lchan->tch_mode = GSM48_CMODE_DATA_29k0;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_43k5_14k5):
lchan->tch_mode = GSM48_CMODE_DATA_43k5_14k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_29k0_14k5):
lchan->tch_mode = GSM48_CMODE_DATA_29k0_14k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_43k5_29k0):
lchan->tch_mode = GSM48_CMODE_DATA_43k5_29k0;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_14k5_43k5):
lchan->tch_mode = GSM48_CMODE_DATA_14k5_43k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_14k5_29k0):
lchan->tch_mode = GSM48_CMODE_DATA_14k5_29k0;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;
case RSL_CMODE(RSL_CMOD_SPD_DATA, RSL_CMOD_CSD_NTA_29k0_43k5):
lchan->tch_mode = GSM48_CMODE_DATA_29k0_43k5;
+ lchan->csd_mode = LCHAN_CSD_M_NT;
break;

/* If octet 4 indicates transparent data */

To view, visit change 38420. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I793ab4dc25fa852eade6f7a3b67ae961ceb7a093
Gerrit-Change-Number: 38420
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>