From b7335dfe79591086424fd1c2b6928eac034a014e Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 1 Jul 2022 17:45:12 +0700 Subject: [PATCH] trxcon: group header files into 'include/osmocom/bb/trxcon' This is the first step towards the goal of moving the scheduler into a separate library. Change-Id: Ifa6137c239c215a3d323213ee74d34b419622be4 Related: OS#5599, OS#3761 --- src/host/trxcon/Makefile.am | 4 ++++ src/host/trxcon/configure.ac | 8 ++++++-- src/host/trxcon/include/Makefile.am | 3 +++ src/host/trxcon/include/osmocom/Makefile.am | 3 +++ src/host/trxcon/include/osmocom/bb/Makefile.am | 3 +++ .../trxcon/include/osmocom/bb/trxcon/Makefile.am | 10 ++++++++++ .../{ => include/osmocom/bb/trxcon}/l1ctl.h | 4 ++-- .../{ => include/osmocom/bb/trxcon}/l1ctl_link.h | 0 .../include/osmocom/bb/trxcon/l1ctl_proto.h | 1 + .../{ => include/osmocom/bb/trxcon}/logging.h | 0 .../{ => include/osmocom/bb/trxcon}/sched_trx.h | 4 ++-- .../{ => include/osmocom/bb/trxcon}/scheduler.h | 0 .../{ => include/osmocom/bb/trxcon}/trx_if.h | 4 ++-- .../{ => include/osmocom/bb/trxcon}/trxcon.h | 0 src/host/trxcon/l1ctl.c | 10 +++++----- src/host/trxcon/l1ctl_link.c | 8 ++++---- src/host/trxcon/l1ctl_proto.h | 1 - src/host/trxcon/logging.c | 2 +- src/host/trxcon/sched_clck.c | 6 +++--- src/host/trxcon/sched_lchan_common.c | 14 +++++++------- src/host/trxcon/sched_lchan_desc.c | 2 +- src/host/trxcon/sched_lchan_pdtch.c | 12 ++++++------ src/host/trxcon/sched_lchan_rach.c | 12 ++++++------ src/host/trxcon/sched_lchan_sch.c | 12 ++++++------ src/host/trxcon/sched_lchan_tchf.c | 12 ++++++------ src/host/trxcon/sched_lchan_tchh.c | 12 ++++++------ src/host/trxcon/sched_lchan_xcch.c | 12 ++++++------ src/host/trxcon/sched_mframe.c | 2 +- src/host/trxcon/sched_prim.c | 8 ++++---- src/host/trxcon/sched_trx.c | 10 +++++----- src/host/trxcon/trx_if.c | 10 +++++----- src/host/trxcon/trxcon.c | 16 ++++++++-------- 32 files changed, 116 insertions(+), 89 deletions(-) create mode 100644 src/host/trxcon/include/Makefile.am create mode 100644 src/host/trxcon/include/osmocom/Makefile.am create mode 100644 src/host/trxcon/include/osmocom/bb/Makefile.am create mode 100644 src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/l1ctl.h (91%) rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/l1ctl_link.h (100%) create mode 120000 src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_proto.h rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/logging.h (100%) rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/sched_trx.h (99%) rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/scheduler.h (100%) rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/trx_if.h (96%) rename src/host/trxcon/{ => include/osmocom/bb/trxcon}/trxcon.h (100%) delete mode 120000 src/host/trxcon/l1ctl_proto.h diff --git a/src/host/trxcon/Makefile.am b/src/host/trxcon/Makefile.am index 893d9ab5d..aa0ae56f1 100644 --- a/src/host/trxcon/Makefile.am +++ b/src/host/trxcon/Makefile.am @@ -1,5 +1,9 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 +SUBDIRS = \ + include \ + $(NULL) + AM_CPPFLAGS = \ $(all_includes) \ -I$(top_srcdir)/include \ diff --git a/src/host/trxcon/configure.ac b/src/host/trxcon/configure.ac index 1f24260da..0e5ce6f40 100644 --- a/src/host/trxcon/configure.ac +++ b/src/host/trxcon/configure.ac @@ -31,5 +31,9 @@ fi dnl Checks for typedefs, structures and compiler characteristics -AC_OUTPUT( - Makefile) +AC_CONFIG_FILES([include/Makefile + include/osmocom/Makefile + include/osmocom/bb/Makefile + include/osmocom/bb/trxcon/Makefile + Makefile]) +AC_OUTPUT diff --git a/src/host/trxcon/include/Makefile.am b/src/host/trxcon/include/Makefile.am new file mode 100644 index 000000000..9d963a024 --- /dev/null +++ b/src/host/trxcon/include/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + osmocom \ + $(NULL) diff --git a/src/host/trxcon/include/osmocom/Makefile.am b/src/host/trxcon/include/osmocom/Makefile.am new file mode 100644 index 000000000..83c6385c6 --- /dev/null +++ b/src/host/trxcon/include/osmocom/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + bb \ + $(NULL) diff --git a/src/host/trxcon/include/osmocom/bb/Makefile.am b/src/host/trxcon/include/osmocom/bb/Makefile.am new file mode 100644 index 000000000..008a9660a --- /dev/null +++ b/src/host/trxcon/include/osmocom/bb/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + trxcon \ + $(NULL) diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am b/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am new file mode 100644 index 000000000..e50652028 --- /dev/null +++ b/src/host/trxcon/include/osmocom/bb/trxcon/Makefile.am @@ -0,0 +1,10 @@ +noinst_HEADERS = \ + l1ctl_proto.h \ + l1ctl_link.h \ + l1ctl.h \ + scheduler.h \ + sched_trx.h \ + trx_if.h \ + logging.h \ + trxcon.h \ + $(NULL) diff --git a/src/host/trxcon/l1ctl.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h similarity index 91% rename from src/host/trxcon/l1ctl.h rename to src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h index 48bbe0976..f93908da9 100644 --- a/src/host/trxcon/l1ctl.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h @@ -3,8 +3,8 @@ #include #include -#include "l1ctl_link.h" -#include "l1ctl_proto.h" +#include +#include /* Event handlers */ int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg); diff --git a/src/host/trxcon/l1ctl_link.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_link.h similarity index 100% rename from src/host/trxcon/l1ctl_link.h rename to src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_link.h diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_proto.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_proto.h new file mode 120000 index 000000000..7ab0f4183 --- /dev/null +++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl_proto.h @@ -0,0 +1 @@ +../../../../../../../include/l1ctl_proto.h \ No newline at end of file diff --git a/src/host/trxcon/logging.h b/src/host/trxcon/include/osmocom/bb/trxcon/logging.h similarity index 100% rename from src/host/trxcon/logging.h rename to src/host/trxcon/include/osmocom/bb/trxcon/logging.h diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/include/osmocom/bb/trxcon/sched_trx.h similarity index 99% rename from src/host/trxcon/sched_trx.h rename to src/host/trxcon/include/osmocom/bb/trxcon/sched_trx.h index 74b41e35f..ab8ef34f6 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/sched_trx.h @@ -9,8 +9,8 @@ #include #include -#include "logging.h" -#include "scheduler.h" +#include +#include #define GSM_BURST_LEN 148 #define GSM_BURST_PL_LEN 116 diff --git a/src/host/trxcon/scheduler.h b/src/host/trxcon/include/osmocom/bb/trxcon/scheduler.h similarity index 100% rename from src/host/trxcon/scheduler.h rename to src/host/trxcon/include/osmocom/bb/trxcon/scheduler.h diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h similarity index 96% rename from src/host/trxcon/trx_if.h rename to src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h index fa66d4a72..89c7dd006 100644 --- a/src/host/trxcon/trx_if.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h @@ -5,8 +5,8 @@ #include #include -#include "scheduler.h" -#include "sched_trx.h" +#include +#include #define TRXC_BUF_SIZE 1024 #define TRXD_BUF_SIZE 512 diff --git a/src/host/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h similarity index 100% rename from src/host/trxcon/trxcon.h rename to src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 94a4d1813..ca78e9b59 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -35,12 +35,12 @@ #include #include -#include "logging.h" -#include "l1ctl_link.h" -#include "l1ctl_proto.h" +#include +#include +#include -#include "trx_if.h" -#include "sched_trx.h" +#include +#include static const char *arfcn2band_name(uint16_t arfcn) { diff --git a/src/host/trxcon/l1ctl_link.c b/src/host/trxcon/l1ctl_link.c index 552fc8b12..b10d9daa7 100644 --- a/src/host/trxcon/l1ctl_link.c +++ b/src/host/trxcon/l1ctl_link.c @@ -36,10 +36,10 @@ #include #include -#include "trxcon.h" -#include "logging.h" -#include "l1ctl_link.h" -#include "l1ctl.h" +#include +#include +#include +#include static struct value_string l1ctl_evt_names[] = { { 0, NULL } /* no events? */ diff --git a/src/host/trxcon/l1ctl_proto.h b/src/host/trxcon/l1ctl_proto.h deleted file mode 120000 index 75862baeb..000000000 --- a/src/host/trxcon/l1ctl_proto.h +++ /dev/null @@ -1 +0,0 @@ -../../../include/l1ctl_proto.h \ No newline at end of file diff --git a/src/host/trxcon/logging.c b/src/host/trxcon/logging.c index 8352e6a2c..04f3568a3 100644 --- a/src/host/trxcon/logging.c +++ b/src/host/trxcon/logging.c @@ -21,7 +21,7 @@ #include #include -#include "logging.h" +#include static struct log_info_cat trx_log_info_cat[] = { [DAPP] = { diff --git a/src/host/trxcon/sched_clck.c b/src/host/trxcon/sched_clck.c index 9476ccd72..1e962aa10 100644 --- a/src/host/trxcon/sched_clck.c +++ b/src/host/trxcon/sched_clck.c @@ -38,9 +38,9 @@ #include #include -#include "scheduler.h" -#include "logging.h" -#include "trx_if.h" +#include +#include +#include #define MAX_FN_SKEW 50 #define TRX_LOSS_FRAMES 400 diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c index ac6d26286..f5ee86646 100644 --- a/src/host/trxcon/sched_lchan_common.c +++ b/src/host/trxcon/sched_lchan_common.c @@ -36,13 +36,13 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trxcon.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include +#include /* GSM 05.02 Chapter 5.2.3 Normal Burst (NB) */ const uint8_t sched_nb_training_bits[8][26] = { diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index b6a72b39c..ed7b141b9 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -26,7 +26,7 @@ #include #include -#include "sched_trx.h" +#include /* Forward declaration of handlers */ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts, diff --git a/src/host/trxcon/sched_lchan_pdtch.c b/src/host/trxcon/sched_lchan_pdtch.c index ad6a73602..3dabc6b45 100644 --- a/src/host/trxcon/sched_lchan_pdtch.c +++ b/src/host/trxcon/sched_lchan_pdtch.c @@ -30,12 +30,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include int rx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, diff --git a/src/host/trxcon/sched_lchan_rach.c b/src/host/trxcon/sched_lchan_rach.c index 76c0abb0b..33c002219 100644 --- a/src/host/trxcon/sched_lchan_rach.c +++ b/src/host/trxcon/sched_lchan_rach.c @@ -30,12 +30,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include /* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)" */ #define RACH_EXT_TAIL_BITS_LEN 8 diff --git a/src/host/trxcon/sched_lchan_sch.c b/src/host/trxcon/sched_lchan_sch.c index 4d7804e0b..ed914a02a 100644 --- a/src/host/trxcon/sched_lchan_sch.c +++ b/src/host/trxcon/sched_lchan_sch.c @@ -31,12 +31,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include static void decode_sb(struct gsm_time *time, uint8_t *bsic, uint8_t *sb_info) { diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c index caf358602..6669bb0d1 100644 --- a/src/host/trxcon/sched_lchan_tchf.c +++ b/src/host/trxcon/sched_lchan_tchf.c @@ -32,12 +32,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, diff --git a/src/host/trxcon/sched_lchan_tchh.c b/src/host/trxcon/sched_lchan_tchh.c index ae67de483..3be3a597a 100644 --- a/src/host/trxcon/sched_lchan_tchh.c +++ b/src/host/trxcon/sched_lchan_tchh.c @@ -35,12 +35,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include static const uint8_t tch_h0_traffic_block_map[3][4] = { /* B0(0,2,4,6), B1(4,6,8,10), B2(8,10,0,2) */ diff --git a/src/host/trxcon/sched_lchan_xcch.c b/src/host/trxcon/sched_lchan_xcch.c index 9fdbcc744..e3accf358 100644 --- a/src/host/trxcon/sched_lchan_xcch.c +++ b/src/host/trxcon/sched_lchan_xcch.c @@ -30,12 +30,12 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "logging.h" -#include "trx_if.h" -#include "l1ctl.h" +#include +#include +#include +#include +#include +#include int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid, diff --git a/src/host/trxcon/sched_mframe.c b/src/host/trxcon/sched_mframe.c index 9b759af3e..f5fb6c97d 100644 --- a/src/host/trxcon/sched_mframe.c +++ b/src/host/trxcon/sched_mframe.c @@ -25,7 +25,7 @@ #include -#include "sched_trx.h" +#include /* Non-combined CCCH */ static const struct trx_frame frame_bcch[51] = { diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c index e5554eabc..847ebd384 100644 --- a/src/host/trxcon/sched_prim.c +++ b/src/host/trxcon/sched_prim.c @@ -29,10 +29,10 @@ #include -#include "scheduler.h" -#include "sched_trx.h" -#include "trx_if.h" -#include "logging.h" +#include +#include +#include +#include /** * Initializes a new primitive by allocating memory diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 828787eea..618ce8bd6 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -31,11 +31,11 @@ #include #include -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" -#include "trx_if.h" -#include "logging.h" +#include +#include +#include +#include +#include static void sched_trx_a5_burst_enc(struct trx_lchan_state *lchan, struct sched_burst_req *br); diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 8dbbd128f..752860957 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -39,11 +39,11 @@ #include -#include "l1ctl.h" -#include "trxcon.h" -#include "trx_if.h" -#include "logging.h" -#include "scheduler.h" +#include +#include +#include +#include +#include static struct value_string trx_evt_names[] = { { 0, NULL } /* no events? */ diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c index d6ba0c4f6..998fddeb0 100644 --- a/src/host/trxcon/trxcon.c +++ b/src/host/trxcon/trxcon.c @@ -39,14 +39,14 @@ #include -#include "trxcon.h" -#include "trx_if.h" -#include "logging.h" -#include "l1ctl.h" -#include "l1ctl_link.h" -#include "l1ctl_proto.h" -#include "scheduler.h" -#include "sched_trx.h" +#include +#include +#include +#include +#include +#include +#include +#include #define COPYRIGHT \ "Copyright (C) 2016-2020 by Vadim Yanitskiy \n" \