aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-03-09 14:22:49 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2023-03-20 10:30:47 +0100
commit4af073c10987231c3ae833bb7f04e2d8ce0ad18a (patch)
tree517d94353b8ab6947a57deb97537c17e5b8a25ab
parenta10a34cf6aaf63402114d12593d05793aad8c429 (diff)
bts: add function to check if a BTS has a BSC co located PCU
At the momemnt we use is_ericsson_bts() to check if the BTS uses a BSC co-located PCU, this is a bit ambiguous, lets have a function that explicitly checks for a BSC co-located PCU and nothing else. Change-Id: I23ed4219e5ebd188867c17f387ca877efa9bc3b0 Related: OS#5198
-rw-r--r--include/osmocom/bsc/bts.h12
-rw-r--r--src/osmo-bsc/timeslot_fsm.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index ea396ccba..ccca1860f 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -751,6 +751,18 @@ static inline bool is_e1_bts(const struct gsm_bts *bts)
return false;
}
+static inline bool bsc_co_located_pcu(const struct gsm_bts *bts)
+{
+ switch (bts->type) {
+ case GSM_BTS_TYPE_RBS2000:
+ return true;
+ default:
+ break;
+ }
+
+ return false;
+}
+
static inline const struct osmo_location_area_id *bts_lai(struct gsm_bts *bts)
{
static struct osmo_location_area_id lai;
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index aa5e0db9d..790ad7745 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -341,7 +341,7 @@ static void ts_fsm_unused_pdch_act(struct osmo_fsm_inst *fi)
return;
}
- if (is_ericsson_bts(bts) && !pcu_connected(bts)) {
+ if (bsc_co_located_pcu(bts) && !pcu_connected(bts)) {
LOG_TS(ts, LOGL_DEBUG, "PCU not connected: not activating PDCH.\n");
return;
}