osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/31545 )
Change subject: lchan.h: remove enum lchan_csd_mode
......................................................................
lchan.h: remove enum lchan_csd_mode
It looks like the idea was to translate the CSD rate from BSSAP to
lchan_csd_mode before translating it to RSL. But instead we can just
directly translate the BSSAP value to the RSL value.
The previous code was not used yet (nothing wrote to csd_mode).
Related: OS#4393
Change-Id: Ice914744da3a2084e82d125848fb69404b8e8a36
---
M include/osmocom/bsc/lchan.h
M src/osmo-bsc/abis_rsl.c
2 files changed, 24 insertions(+), 63 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/31545/1
diff --git a/include/osmocom/bsc/lchan.h b/include/osmocom/bsc/lchan.h
index 4fcfa20..1fd1771 100644
--- a/include/osmocom/bsc/lchan.h
+++ b/include/osmocom/bsc/lchan.h
@@ -44,24 +44,14 @@
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;
+ /* only used for GSM48_CMODE_DATA_*,
+ * see 3GPP TS 48.058 § 9.3.6 Channel Mode octet 6 */
+ bool data_transparent;
+ uint8_t data_rate;
};
/* Channel Request reason */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index ee2e2d3..f92de5e 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -460,55 +460,10 @@
case GSM48_CMODE_DATA_14k5:
case GSM48_CMODE_DATA_12k0:
case GSM48_CMODE_DATA_6k0:
- switch (ch_mode_rate->csd_mode) {
- case LCHAN_CSD_M_NT:
- /* non-transparent CSD with RLP */
- switch (ch_mode_rate->chan_mode) {
- case GSM48_CMODE_DATA_14k5:
- cm->chan_rate = RSL_CMOD_SP_NT_14k5;
- break;
- case GSM48_CMODE_DATA_12k0:
- cm->chan_rate = RSL_CMOD_SP_NT_12k0;
- break;
- case GSM48_CMODE_DATA_6k0:
- cm->chan_rate = RSL_CMOD_SP_NT_6k0;
- break;
- default:
- LOGP(DRSL, LOGL_ERROR,
- "unsupported lchan->tch_mode %u\n",
- ch_mode_rate->chan_mode);
- return -EINVAL;
- }
- break;
- /* transparent data services below */
- case LCHAN_CSD_M_T_1200_75:
- cm->chan_rate = RSL_CMOD_CSD_T_1200_75;
- break;
- case LCHAN_CSD_M_T_600:
- cm->chan_rate = RSL_CMOD_CSD_T_600;
- break;
- case LCHAN_CSD_M_T_1200:
- cm->chan_rate = RSL_CMOD_CSD_T_1200;
- break;
- case LCHAN_CSD_M_T_2400:
- cm->chan_rate = RSL_CMOD_CSD_T_2400;
- break;
- case LCHAN_CSD_M_T_9600:
- cm->chan_rate = RSL_CMOD_CSD_T_9600;
- break;
- case LCHAN_CSD_M_T_14400:
- cm->chan_rate = RSL_CMOD_CSD_T_14400;
- break;
- case LCHAN_CSD_M_T_29000:
- cm->chan_rate = RSL_CMOD_CSD_T_29000;
- break;
- case LCHAN_CSD_M_T_32000:
- cm->chan_rate = RSL_CMOD_CSD_T_32000;
- break;
- default:
- LOGP(DRSL, LOGL_ERROR, "unsupported csd_mode %u\n",
ch_mode_rate->csd_mode);
- return -EINVAL;
- }
+ /* 3GPP TS 48.058 § 9.3.6 Channel Mode octet 6 */
+ cm->chan_rate = ch_mode_rate->data_rate;
+ if (!ch_mode_rate->data_transparent)
+ cm->chan_rate |= 0x40;
break;
default:
LOGP(DRSL, LOGL_ERROR, "unsupported channel mode %u\n",
ch_mode_rate->chan_mode);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/31545
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ice914744da3a2084e82d125848fb69404b8e8a36
Gerrit-Change-Number: 31545
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange