aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-05-31 23:15:38 +0200
committerHarald Welte <laforge@gnumonks.org>2012-06-01 00:06:58 +0200
commit799ea59c2feeb9fe7ea9e9c202376e973ffca711 (patch)
tree967a162fd8b11b2f078ef65fb27b1e696f0561b7 /src/osmo-bts-sysmo/l1_if.c
parent700c645478249319dcf7e7e138c13dbbb9c04ba9 (diff)
sysmobts: set the RF ACTIVE LED when we bring RF up
Once we get RF-ACTIVATE.conf from L1, we now enable the corresponding LED. We also switch it off on RF-DEACTIVATE.conf. We do _not_ switch it off when osmo-bts crashes or terminates before RF-DEACTIVATE.conf. The latter is intentional, as RF may very well still be active at that point. The re-spawning script will re-set the DSP and therby turn off the RF and then disable the LED. A better solution might be to do all this in the kernel driver for the DSP.
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 74d08f10..f5813b65 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -54,6 +54,7 @@
#include "femtobts.h"
#include "l1_if.h"
#include "l1_transp.h"
+#include "hw_misc.h"
/* FIXME: make threshold configurable */
#define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */
@@ -847,7 +848,9 @@ static int activate_rf_compl_cb(struct msgb *resp, void *data)
LOGP(DL1C, LOGL_FATAL, "RF-ACT.conf with status %s\n",
get_value_string(femtobts_l1status_names, status));
bts_shutdown(trx->bts, "RF-ACT failure");
- }
+ } else
+ sysmobts_led_set(LED_RF_ACTIVE, 1);
+
/* signal availability */
oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OK);
oml_mo_tx_sw_act_rep(&trx->mo);
@@ -857,6 +860,7 @@ static int activate_rf_compl_cb(struct msgb *resp, void *data)
for (i = 0; i < ARRAY_SIZE(trx->ts); i++)
oml_mo_state_chg(&trx->ts[i].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
} else {
+ sysmobts_led_set(LED_RF_ACTIVE, 0);
oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
oml_mo_state_chg(&trx->bb_transc.mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
}