[PATCH] osmocom-bb[master]: host/trxcon/scheduler: share common declarations of lchan ha...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 22 15:33:23 UTC 2018


Review at  https://gerrit.osmocom.org/6778

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
---
M src/host/trxcon/sched_lchan_common.c
M src/host/trxcon/sched_lchan_xcch.c
M src/host/trxcon/sched_trx.h
3 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/6778/1

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 @@
 	*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_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);

-- 
To view, visit https://gerrit.osmocom.org/6778
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71980f09a0c0e023370e1a651afc24fff2491552
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list