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
This commit is contained in:
Philipp Maier 2023-03-09 14:22:49 +01:00
parent a10a34cf6a
commit 4af073c109
2 changed files with 13 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}