Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10458 )
Change subject: trxcon/scheduler: get rid of useless lchan->rsl_mode ...................................................................... trxcon/scheduler: get rid of useless lchan->rsl_mode This field of the logical channel state structure was not used at all as there is nothing related to A-bis / RSL in trxcon itself. Change-Id: Iec1abf777a74cf57deadafa95e2337cba5d02842 --- M src/host/trxcon/sched_lchan_common.c M src/host/trxcon/sched_lchan_tchf.c M src/host/trxcon/sched_prim.c M src/host/trxcon/sched_trx.c M src/host/trxcon/sched_trx.h 5 files changed, 5 insertions(+), 26 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c index 76a32fe..2767b90 100644 --- a/src/host/trxcon/sched_lchan_common.c +++ b/src/host/trxcon/sched_lchan_common.c @@ -36,7 +36,6 @@ #include <osmocom/codec/codec.h> #include <osmocom/gsm/protocol/gsm_04_08.h> -#include <osmocom/gsm/protocol/gsm_08_58.h> #include "l1ctl_proto.h" #include "scheduler.h" @@ -145,10 +144,6 @@ */ size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan) { - /* BFI is only required for speech */ - if (lchan->rsl_cmode != RSL_CMOD_SPD_SPEECH) - return 0; - switch (lchan->tch_mode) { case GSM48_CMODE_SIGN: case GSM48_CMODE_SPEECH_V1: diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c index 86cdb12..f6465f9 100644 --- a/src/host/trxcon/sched_lchan_tchf.c +++ b/src/host/trxcon/sched_lchan_tchf.c @@ -30,7 +30,6 @@ #include <osmocom/core/bits.h> #include <osmocom/gsm/protocol/gsm_04_08.h> -#include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gsm/gsm_utils.h> #include <osmocom/coding/gsm0503_coding.h> @@ -50,7 +49,6 @@ { const struct trx_lchan_desc *lchan_desc; int n_errors = -1, n_bits_total, rc; - uint8_t rsl_cmode, tch_mode, mode; sbit_t *buffer, *offset; uint8_t l2[128], *mask; uint32_t *first_fn; @@ -92,15 +90,6 @@ if (bid != 3) return 0; - /** - * Get current RSL / TCH modes - * - * FIXME: we do support speech only, and - * CSD support may be implemented latter. - */ - rsl_cmode = RSL_CMOD_SPD_SPEECH; - tch_mode = lchan->tch_mode; - /* Check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { LOGP(DSCHD, LOGL_ERROR, "Received incomplete traffic frame at " @@ -113,10 +102,7 @@ goto bfi; } - mode = rsl_cmode != RSL_CMOD_SPD_SPEECH ? - GSM48_CMODE_SPEECH_V1 : tch_mode; - - switch (mode) { + switch (lchan->tch_mode) { case GSM48_CMODE_SIGN: case GSM48_CMODE_SPEECH_V1: /* FR */ rc = gsm0503_tch_fr_decode(l2, buffer, @@ -134,7 +120,7 @@ LOGP(DSCHD, LOGL_ERROR, "AMR isn't supported yet\n"); return -ENOTSUP; default: - LOGP(DSCHD, LOGL_ERROR, "Invalid TCH mode: %u\n", tch_mode); + LOGP(DSCHD, LOGL_ERROR, "Invalid TCH mode: %u\n", lchan->tch_mode); return -EINVAL; } diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c index 2aeaa5d..e663bc3 100644 --- a/src/host/trxcon/sched_prim.c +++ b/src/host/trxcon/sched_prim.c @@ -32,7 +32,6 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/gsm_04_08.h> -#include <osmocom/gsm/protocol/gsm_08_58.h> #include "scheduler.h" #include "sched_trx.h" diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index fd43a56..8bd3c72 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -465,8 +465,7 @@ lchan->dl_ongoing_facch = 0; lchan->ul_ongoing_facch = 0; - lchan->rsl_cmode = 0x00; - lchan->tch_mode = 0x00; + lchan->tch_mode = GSM48_CMODE_SIGN; /* Reset AMR state */ memset(&lchan->amr, 0x00, sizeof(lchan->amr)); diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index 2aafbf0..730923b 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -167,8 +167,8 @@ /*! \brief A primitive being sent */ struct trx_ts_prim *prim; - /*! \brief Mode for TCH channels */ - uint8_t rsl_cmode, tch_mode; + /*! \brief Mode for TCH channels (see GSM48_CMODE_*) */ + uint8_t tch_mode; /*! \brief FACCH/H on downlink */ uint8_t dl_ongoing_facch; -- To view, visit https://gerrit.osmocom.org/10458 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iec1abf777a74cf57deadafa95e2337cba5d02842 Gerrit-Change-Number: 10458 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder