summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-08-15 09:00:16 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-08-15 09:32:08 +0700
commit347406cee7f4ea1094b0af0ff92da6c4835aa37f (patch)
tree9619e4decc59724b3ef950de1b251628eecaae42
parent7c4151ae52688d46894f3a5dc99464412ae802da (diff)
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
-rw-r--r--src/host/trxcon/sched_lchan_common.c5
-rw-r--r--src/host/trxcon/sched_lchan_tchf.c18
-rw-r--r--src/host/trxcon/sched_prim.c1
-rw-r--r--src/host/trxcon/sched_trx.c3
-rw-r--r--src/host/trxcon/sched_trx.h4
5 files changed, 5 insertions, 26 deletions
diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index 76a32fe0..2767b90d 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 @@ int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
*/
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 86cdb12b..f6465f9b 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 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
{
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 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
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 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
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 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
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 2aeaa5de..e663bc3f 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 fd43a56d..8bd3c722 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -465,8 +465,7 @@ static void sched_trx_reset_lchan(struct trx_lchan_state *lchan)
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 2aafbf06..730923b4 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -167,8 +167,8 @@ struct trx_lchan_state {
/*! \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;