From 06a14d289bf20f218d22380b11c4ad81ca5f54d2 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 26 May 2020 12:41:18 +0200 Subject: flatten: move network->bsc_data->* to network->* The separate struct osmo_bsc_data is like another separate struct gsm_network for no reason. It is labeled "per-BSC data". These days, all of this is a single BSC and there will not be different sets of osmo_bsc_data. Drop struct osmo_bsc_data, move its members directly into gsm_network. Some places tested 'if (net->bsc_data)', which is always true. Modify those cases to rather do checks like 'if (net->rf_ctrl)', which are also always true AFAICT, to keep as much unmodified logic as possible in this patch. Change-Id: Ic7ae65e3b36e6e4b279eb01ad594f1226b5929e0 --- include/osmocom/bsc/bsc_msc_data.h | 20 -------------------- include/osmocom/bsc/gsm_data.h | 12 ++++++++++-- 2 files changed, 10 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 364fa727b..43adaec00 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -181,26 +181,6 @@ struct bsc_msc_data { } mgcp_ipa; }; -/* - * Per BSC data. - */ -struct bsc_cbc_link; -struct osmo_bsc_data { - struct gsm_network *network; - - /* msc configuration */ - struct llist_head mscs; - - /* rf ctl related bits */ - int mid_call_timeout; - char *rf_ctrl_name; - struct osmo_bsc_rf *rf_ctrl; - int auto_off_timeout; - - struct bsc_cbc_link *cbc; -}; - - int osmo_bsc_msc_init(struct bsc_msc_data *msc); int osmo_bsc_sccp_init(struct gsm_network *gsmnet); diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index d801d2c77..42eb583e7 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1649,8 +1649,16 @@ struct gsm_network { /* Use a TCH for handling requests of type paging any */ int pag_any_tch; - /* MSC data in case we are a true BSC */ - struct osmo_bsc_data *bsc_data; + /* msc configuration */ + struct llist_head mscs; + + /* rf ctl related bits */ + int mid_call_timeout; + char *rf_ctrl_name; + struct osmo_bsc_rf *rf_ctrl; + int auto_off_timeout; + + struct bsc_cbc_link *cbc; /* control interface */ struct ctrl_handle *ctrl; -- cgit v1.2.3