aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bts_siemens_bs11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libbsc/bts_siemens_bs11.c')
-rw-r--r--src/libbsc/bts_siemens_bs11.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/libbsc/bts_siemens_bs11.c b/src/libbsc/bts_siemens_bs11.c
index 5a5f8830..df4a1dc2 100644
--- a/src/libbsc/bts_siemens_bs11.c
+++ b/src/libbsc/bts_siemens_bs11.c
@@ -19,9 +19,8 @@
*
*/
-#include <sys/types.h>
-#include <osmocore/tlv.h>
+#include <osmocom/gsm/tlv.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
@@ -29,9 +28,12 @@
#include <openbsc/e1_input.h>
#include <openbsc/signal.h>
+static int bts_model_bs11_start(struct gsm_network *net);
+
static struct gsm_bts_model model_bs11 = {
.type = GSM_BTS_TYPE_BS11,
.name = "bs11",
+ .start = bts_model_bs11_start,
.oml_rcvmsg = &abis_nm_rcvmsg,
.nm_att_tlvdef = {
.def = {
@@ -346,8 +348,8 @@ static unsigned char bs11_attr_radio[] =
*/
static void patch_nm_tables(struct gsm_bts *bts)
{
- u_int8_t arfcn_low = bts->c0->arfcn & 0xff;
- u_int8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
+ uint8_t arfcn_low = bts->c0->arfcn & 0xff;
+ uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f;
/* patch ARFCN into BTS Attributes */
bs11_attr_bts[69] &= 0xf0;
@@ -364,8 +366,8 @@ static void patch_nm_tables(struct gsm_bts *bts)
bs11_attr_bts[33] = bts->rach_b_thresh & 0xff;
if (bts->rach_ldavg_slots != -1) {
- u_int8_t avg_high = bts->rach_ldavg_slots & 0xff;
- u_int8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
+ uint8_t avg_high = bts->rach_ldavg_slots & 0xff;
+ uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
bs11_attr_bts[35] = avg_high;
bs11_attr_bts[36] = avg_low;
@@ -425,9 +427,9 @@ static void nm_reconfig_trx(struct gsm_bts_trx *trx)
abis_nm_set_radio_attr(trx, bs11_attr_radio,
sizeof(bs11_attr_radio));
else {
- u_int8_t trx1_attr_radio[sizeof(bs11_attr_radio)];
- u_int8_t arfcn_low = trx->arfcn & 0xff;
- u_int8_t arfcn_high = (trx->arfcn >> 8) & 0x0f;
+ uint8_t trx1_attr_radio[sizeof(bs11_attr_radio)];
+ uint8_t arfcn_low = trx->arfcn & 0xff;
+ uint8_t arfcn_high = (trx->arfcn >> 8) & 0x0f;
memcpy(trx1_attr_radio, bs11_attr_radio,
sizeof(trx1_attr_radio));
@@ -576,7 +578,7 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
return 0;
}
-int bts_model_bs11_init(void)
+static int bts_model_bs11_start(struct gsm_network *net)
{
model_bs11.features.data = &model_bs11._features_data[0];
model_bs11.features.data_len = sizeof(model_bs11._features_data);
@@ -584,8 +586,13 @@ int bts_model_bs11_init(void)
gsm_btsmodel_set_feature(&model_bs11, BTS_FEAT_HOPPING);
gsm_btsmodel_set_feature(&model_bs11, BTS_FEAT_HSCSD);
- register_signal_handler(SS_INPUT, inp_sig_cb, NULL);
- register_signal_handler(SS_GLOBAL, gbl_sig_cb, NULL);
+ osmo_signal_register_handler(SS_INPUT, inp_sig_cb, NULL);
+ osmo_signal_register_handler(SS_GLOBAL, gbl_sig_cb, NULL);
+ return 0;
+}
+
+int bts_model_bs11_init(void)
+{
return gsm_bts_model_register(&model_bs11);
}