summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-08-16 13:36:20 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commitda83ccf9f7013289ca37931cf1ec3a8b6aaf4753 (patch)
tree5fcf704a6c1b1d82c9dd693e0a93fa36180be71e
parent41de73575289b0272a20a7b17ad04218e1816808 (diff)
host/trxcon/scheduler: share common declarations of lchan handlers
The training sequences, data / traffic indication and confirmation helpers are used by several lchan handlers, like xCCC and TCH. It would be better to have them all declared within a shared header. Change-Id: I71980f09a0c0e023370e1a651afc24fff2491552
-rw-r--r--src/host/trxcon/sched_lchan_common.c2
-rw-r--r--src/host/trxcon/sched_lchan_xcch.c11
-rw-r--r--src/host/trxcon/sched_trx.h9
3 files changed, 11 insertions, 11 deletions
diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index 5383ef4..aa0614c 100644
--- a/src/host/trxcon/sched_lchan_common.c
+++ b/src/host/trxcon/sched_lchan_common.c
@@ -41,7 +41,7 @@
#include "l1ctl.h"
/* GSM 05.02 Chapter 5.2.3 Normal Burst (NB) */
-const uint8_t nb_training_bits[8][26] = {
+const uint8_t sched_nb_training_bits[8][26] = {
{
0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0,
0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1,
diff --git a/src/host/trxcon/sched_lchan_xcch.c b/src/host/trxcon/sched_lchan_xcch.c
index dd76d0a..958d80d 100644
--- a/src/host/trxcon/sched_lchan_xcch.c
+++ b/src/host/trxcon/sched_lchan_xcch.c
@@ -42,15 +42,6 @@
#include "trxcon.h"
#include "l1ctl.h"
-/* Forward declarations */
-extern const uint8_t nb_training_bits[8][26];
-
-int sched_send_data_ind(struct trx_instance *trx, struct trx_ts *ts,
- struct trx_lchan_state *lchan, uint8_t *l2, size_t l2_len);
-
-int sched_send_data_conf(struct trx_instance *trx, struct trx_ts *ts,
- struct trx_lchan_state *lchan, uint32_t fn, size_t l2_len);
-
int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
sbit_t *bits, int8_t rssi, float toa)
@@ -185,7 +176,7 @@ send_burst:
*mask |= (1 << bid);
/* Choose proper TSC */
- tsc = nb_training_bits[trx->tsc];
+ tsc = sched_nb_training_bits[trx->tsc];
/* Compose a new burst */
memset(burst, 0, 3); /* TB */
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index 4209f53..9d038fb 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -277,3 +277,12 @@ int sched_trx_push_prim(struct trx_instance *trx,
int sched_trx_handle_rx_burst(struct trx_instance *trx, uint8_t tn,
uint32_t burst_fn, sbit_t *bits, uint16_t nbits, int8_t rssi, float toa);
+
+/* Shared declarations for lchan handlers */
+extern const uint8_t sched_nb_training_bits[8][26];
+
+size_t sched_bad_frame_ind(uint8_t *l2, uint8_t rsl_cmode, uint8_t tch_mode);
+int sched_send_data_ind(struct trx_instance *trx, struct trx_ts *ts,
+ struct trx_lchan_state *lchan, uint8_t *l2, size_t l2_len);
+int sched_send_data_conf(struct trx_instance *trx, struct trx_ts *ts,
+ struct trx_lchan_state *lchan, uint32_t fn, size_t l2_len);