Change in osmo-bsc[master]: move lchan->csd_mode into channel_mode_and_rate

neels gerrit-no-reply at lists.osmocom.org
Tue Jun 1 17:29:37 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24355 )

Change subject: move lchan->csd_mode into channel_mode_and_rate
......................................................................

move lchan->csd_mode into channel_mode_and_rate

The GSM48_CMODE_DATA_* rates are completely unused in OsmoBSC anyway,
but there is some code in abis_rsl.c checking its value, and if we were
to start using it that is the place where it should be.

Related: SYS#5315 OS#4940 OS#3787 OS#3833
Change-Id: Ie0e065a5dca5f4a31d5d81e3528a539214a74170
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
2 files changed, 16 insertions(+), 18 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, approved



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index ce47792..04d5e52 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -107,10 +107,24 @@
 
 enum channel_rate chan_t_to_chan_rate(enum gsm_chan_t chan_t);
 
+enum lchan_csd_mode {
+	LCHAN_CSD_M_NT,
+	LCHAN_CSD_M_T_1200_75,
+	LCHAN_CSD_M_T_600,
+	LCHAN_CSD_M_T_1200,
+	LCHAN_CSD_M_T_2400,
+	LCHAN_CSD_M_T_9600,
+	LCHAN_CSD_M_T_14400,
+	LCHAN_CSD_M_T_29000,
+	LCHAN_CSD_M_T_32000,
+};
+
 struct channel_mode_and_rate {
 	enum gsm48_chan_mode chan_mode;
 	enum channel_rate chan_rate;
 	uint16_t s15_s0;
+	/* only used for GSM48_CMODE_DATA_* */
+	enum lchan_csd_mode csd_mode;
 };
 
 enum assign_for {
@@ -499,18 +513,6 @@
 };
 /* /BTS ONLY */
 
-enum lchan_csd_mode {
-	LCHAN_CSD_M_NT,
-	LCHAN_CSD_M_T_1200_75,
-	LCHAN_CSD_M_T_600,
-	LCHAN_CSD_M_T_1200,
-	LCHAN_CSD_M_T_2400,
-	LCHAN_CSD_M_T_9600,
-	LCHAN_CSD_M_T_14400,
-	LCHAN_CSD_M_T_29000,
-	LCHAN_CSD_M_T_32000,
-};
-
 /* State of the SAPIs in the lchan */
 enum lchan_sapi_state {
 	LCHAN_SAPI_S_NONE,
@@ -667,8 +669,6 @@
 
 	/* The logical channel type */
 	enum gsm_chan_t type;
-	/* RSL channel mode */
-	enum lchan_csd_mode csd_mode;
 	/* Power levels for MS and BTS */
 	uint8_t bs_power;
 	uint8_t ms_power;
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 9aced8b..ecc7329 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -405,7 +405,7 @@
 	case GSM48_CMODE_DATA_14k5:
 	case GSM48_CMODE_DATA_12k0:
 	case GSM48_CMODE_DATA_6k0:
-		switch (lchan->csd_mode) {
+		switch (ch_mode_rate->csd_mode) {
 		case LCHAN_CSD_M_NT:
 			/* non-transparent CSD with RLP */
 			switch (ch_mode_rate->chan_mode) {
@@ -451,9 +451,7 @@
 			cm->chan_rate = RSL_CMOD_CSD_T_32000;
 			break;
 		default:
-			LOGP(DRSL, LOGL_ERROR,
-			     "unsupported lchan->csd_mode %u\n",
-			     lchan->csd_mode);
+			LOGP(DRSL, LOGL_ERROR, "unsupported csd_mode %u\n", ch_mode_rate->csd_mode);
 			return -EINVAL;
 		}
 		break;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie0e065a5dca5f4a31d5d81e3528a539214a74170
Gerrit-Change-Number: 24355
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/0e9511f2/attachment.htm>


More information about the gerrit-log mailing list