From 5b69ec3e720d21753101c9a0e1a38d0926ba3854 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 4 Nov 2013 18:13:52 +0100 Subject: sysmobts: Use status flags instead of direct LED access Currently the LEDs are being accessed directly from within the l1_if.c file. So the handling of rf mute and activate/deactivate both access LED_RF_ACTIVE directly. This may lead to an inconsistent LED status. This patch replaces these calls to sysmobts_led_set() by an abstract equivalent bts_update_status(), that uses a set of independant status ids. The associated values can than be combined into a visible LED status. Currently LED_RF_ACTIVE is on iff BTS_STATUS_RF_ACTIVE is set and BTS_STATUS_RF_MUTE is not set. Sponsored-by: On-Waves ehf --- include/osmo-bts/bts.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index 583c1eb1..e2020350 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -3,6 +3,12 @@ #include +enum bts_global_status { + BTS_STATUS_RF_ACTIVE, + BTS_STATUS_RF_MUTE, + BTS_STATUS_LAST, +}; + extern void *tall_bts_ctx; int bts_init(struct gsm_bts *bts); @@ -27,5 +33,7 @@ int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); +void bts_update_status(enum bts_global_status which, int on); + #endif /* _BTS_H */ -- cgit v1.2.3