aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r--src/osmo-bts-sysmo/bts_model.c9
-rw-r--r--src/osmo-bts-sysmo/l1_if.h1
-rw-r--r--src/osmo-bts-sysmo/main.c6
3 files changed, 13 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/bts_model.c b/src/osmo-bts-sysmo/bts_model.c
index 7e9ffee2..ac4e2055 100644
--- a/src/osmo-bts-sysmo/bts_model.c
+++ b/src/osmo-bts-sysmo/bts_model.c
@@ -23,6 +23,8 @@
#include <osmo-bts/oml.h>
#include <osmo-bts/bts_model.h>
+#include "l1_if.h"
+
int bts_model_rsl_chan_act(struct gsm_lchan *lchan, struct tlv_parsed *tp)
{
uint8_t mode = *TLVP_VAL(tp, RSL_IE_CHAN_MODE);
@@ -44,3 +46,10 @@ int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan)
{
return lchan_deactivate_sacch(lchan);
}
+
+int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
+{
+ struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx);
+
+ return l1if_activate_rf(fl1, 0);
+}
diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h
index 7dcae537..7268fe21 100644
--- a/src/osmo-bts-sysmo/l1_if.h
+++ b/src/osmo-bts-sysmo/l1_if.h
@@ -40,6 +40,7 @@ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg,
struct femtol1_hdl *l1if_open(void *priv);
int l1if_close(struct femtol1_hdl *hdl);
int l1if_reset(struct femtol1_hdl *hdl);
+int l1if_activate_rf(struct femtol1_hdl *hdl, int on);
struct msgb *l1p_msgb_alloc(void);
struct msgb *sysp_msgb_alloc(void);
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index e2afdf7a..bc4f916a 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -160,6 +160,8 @@ static void handle_options(int argc, char **argv)
}
}
+static struct gsm_bts *bts;
+
static void signal_handler(int signal)
{
fprintf(stderr, "signal %u received\n", signal);
@@ -167,8 +169,7 @@ static void signal_handler(int signal)
switch (signal) {
case SIGINT:
//osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
- sleep(3);
- exit(0);
+ bts_shutdown(bts);
break;
case SIGABRT:
case SIGUSR1:
@@ -182,7 +183,6 @@ static void signal_handler(int signal)
int main(int argc, char **argv)
{
- struct gsm_bts *bts;
struct ipabis_link *link;
void *tall_msgb_ctx;
int rc;