Remove BTS-specific attributes
Remove *bts_model_* functions as they are only useful to BSC.
Change-Id: Ic80d11d6f8167b49a94fc9c6edbc5ff9fbe36587
diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 03896b5..07b2e2f 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -9,8 +9,6 @@
bsc_msc.h \
bsc_msg_filter.h \
bsc_rll.h \
- bss.h \
- bts_ipaccess_nanobts_omlattr.h \
chan_alloc.h \
common.h \
common_bsc.h \
diff --git a/include/osmocom/msc/bss.h b/include/osmocom/msc/bss.h
deleted file mode 100644
index 0904334..0000000
--- a/include/osmocom/msc/bss.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _BSS_H_
-#define _BSS_H_
-
-#include <osmocom/msc/gsm_data.h>
-
-struct msgb;
-
-/* start and stop network */
-extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv);
-extern int bsc_network_configure(const char *cfg_file);
-extern int bsc_shutdown_net(struct gsm_network *net);
-
-/* register all supported BTS */
-extern int bts_init(void);
-extern int bts_model_bs11_init(void);
-extern int bts_model_rbs2k_init(void);
-extern int bts_model_nanobts_init(void);
-extern int bts_model_nokia_site_init(void);
-extern int bts_model_sysmobts_init(void);
-#endif
diff --git a/include/osmocom/msc/bts_ipaccess_nanobts_omlattr.h b/include/osmocom/msc/bts_ipaccess_nanobts_omlattr.h
deleted file mode 100644
index bc7860b..0000000
--- a/include/osmocom/msc/bts_ipaccess_nanobts_omlattr.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* OML attribute table generator for ipaccess nanobts */
-
-/* (C) 2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
- * All Rights Reserved
- *
- * Author: Philipp Maier
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <osmocom/core/msgb.h>
-
-struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts);
-struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts);
-struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts);
-struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts);
-struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts,
- struct gsm_bts_trx *trx);
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index c2533a5..4d493cb 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -559,8 +559,6 @@
extern void talloc_ctx_init(void *ctx_root);
-int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type);
-
enum gsm_bts_type parse_btstype(const char *arg);
const char *btstype2str(enum gsm_bts_type type);
struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
@@ -569,68 +567,6 @@
extern void *tall_bsc_ctx;
extern int ipacc_rtp_direct;
-/* this actaully refers to the IPA transport, not the BTS model */
-static inline int is_ipaccess_bts(struct gsm_bts *bts)
-{
- switch (bts->type) {
- case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMOBTS:
- return 1;
- default:
- break;
- }
- return 0;
-}
-
-static inline int is_sysmobts_v2(struct gsm_bts *bts)
-{
- switch (bts->type) {
- case GSM_BTS_TYPE_OSMOBTS:
- return 1;
- default:
- break;
- }
- return 0;
-}
-
-static inline int is_siemens_bts(struct gsm_bts *bts)
-{
- switch (bts->type) {
- case GSM_BTS_TYPE_BS11:
- return 1;
- default:
- break;
- }
-
- return 0;
-}
-
-static inline int is_nokia_bts(struct gsm_bts *bts)
-{
- switch (bts->type) {
- case GSM_BTS_TYPE_NOKIA_SITE:
- return 1;
- default:
- break;
- }
-
- return 0;
-}
-
-static inline int is_e1_bts(struct gsm_bts *bts)
-{
- switch (bts->type) {
- case GSM_BTS_TYPE_BS11:
- case GSM_BTS_TYPE_RBS2000:
- case GSM_BTS_TYPE_NOKIA_SITE:
- return 1;
- default:
- break;
- }
-
- return 0;
-}
-
enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
@@ -639,29 +575,21 @@
enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid);
const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
-int bts_gprs_mode_is_compat(struct gsm_bts *bts, enum bts_gprs_mode mode);
int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts);
void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
-int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
-int gsm_bts_model_register(struct gsm_bts_model *model);
-
struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lchan);
void bsc_subscr_con_free(struct gsm_subscriber_connection *conn);
struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network *network);
void msc_subscr_con_free(struct gsm_subscriber_connection *conn);
-struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net,
- enum gsm_bts_type type,
- uint8_t bsic);
-
void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
uint8_t e1_ts, uint8_t e1_ts_ss);
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
-bool gsm_btsmodel_has_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
+
struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
int gsm_bts_trx_set_system_infos(struct gsm_bts_trx *trx);
int gsm_bts_set_system_infos(struct gsm_bts *bts);
@@ -676,12 +604,6 @@
int bsc_base_ctrl_cmds_install(void);
int msc_ctrl_cmds_install(struct gsm_network *net);
-/* dependency handling */
-void bts_depend_mark(struct gsm_bts *bts, int dep);
-void bts_depend_clear(struct gsm_bts *bts, int dep);
-int bts_depend_check(struct gsm_bts *bts);
-int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other);
-
bool classmark_is_r99(struct gsm_classmark *cm);
#endif /* _GSM_DATA_H */
diff --git a/include/osmocom/msc/gsm_data_shared.h b/include/osmocom/msc/gsm_data_shared.h
index 194cacd..63f4d33 100644
--- a/include/osmocom/msc/gsm_data_shared.h
+++ b/include/osmocom/msc/gsm_data_shared.h
@@ -523,30 +523,6 @@
struct vty;
-struct gsm_bts_model {
- struct llist_head list;
-
- enum gsm_bts_type type;
- enum gsm_bts_type_variant variant;
- const char *name;
-
- bool started;
- int (*start)(struct gsm_network *net);
- int (*oml_rcvmsg)(struct msgb *msg);
-
- void (*e1line_bind_ops)(struct e1inp_line *line);
-
- void (*config_write_bts)(struct vty *vty, struct gsm_bts *bts);
- void (*config_write_trx)(struct vty *vty, struct gsm_bts_trx *trx);
- void (*config_write_ts)(struct vty *vty, struct gsm_bts_trx_ts *ts);
-
- struct tlv_definition nm_att_tlvdef;
-
- /* features of a given BTS model set via gsm_bts_model_register() locally */
- struct bitvec features;
- uint8_t _features_data[MAX_BTS_FEATURES/8];
-};
-
/* N. B: always add new features to the end of the list (right before _NUM_BTS_FEAT) to avoid breaking compatibility
with BTS compiled against earlier version of this header */
enum gsm_bts_features {
@@ -690,7 +666,7 @@
/* type of BTS */
enum gsm_bts_type type;
enum gsm_bts_type_variant variant;
- struct gsm_bts_model *model;
+
enum gsm_band band;
char version[MAX_VERSION_LENGTH];
char sub_model[MAX_VERSION_LENGTH];