dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/31687 )
Change subject: pcu_sock: only allow Ericsson RBS to connect to external PCU
......................................................................
pcu_sock: only allow Ericsson RBS to connect to external PCU
Lets make sure that only Ericsson RBS BTSs can connect to an external
PCU. Since we then can be sure that only BTSs with BSC co-located PCU
support have PCU connections we can use this to distinguish the two BTS
variants and we can get rid of all later checks.
Change-Id: I18d190d661b06015419078382915c4606be01b04
---
M src/osmo-bsc/pcu_sock.c
1 file changed, 23 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/87/31687/1
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 52e19ba..eae9383 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -63,10 +63,6 @@
{
struct pcu_sock_state *state = bts->pcu_state;
- /* BSC co-located PCU is only supported for Ericsson RBS */
- if (!is_ericsson_bts(bts))
- return false;
-
if (!state)
return false;
if (state->conn_bfd.fd <= 0)
@@ -361,13 +357,8 @@
__attribute__((weak)) void pcu_info_update(struct gsm_bts *bts)
{
if (pcu_connected(bts)) {
- /* In cases where the CCU is connected via an E1 line, we transmit the connection
parameters for the
- * PDCH before we announce the other BTS related parameters. At the moment Ericsson RBS
is the only
- * E1 BTS we support and also the only BTS we support with a BSC co-located-pcu */
- if (is_ericsson_bts(bts)) {
- pcu_tx_e1_ccu_ind(bts);
- pcu_tx_info_ind(bts);
- }
+ pcu_tx_e1_ccu_ind(bts);
+ pcu_tx_info_ind(bts);
}
}
@@ -782,8 +773,7 @@
osmo_fd_read_enable(&state->listen_bfd);
/* Disable all PDCHs on all BTSs that are served by the PCU */
- if (is_ericsson_bts(bts))
- pdch_deact_bts(bts);
+ pdch_deact_bts(bts);
/* flush the queue */
while (!llist_empty(&state->upqueue)) {
@@ -956,8 +946,7 @@
LOG_BTS(bts, DPCU, LOGL_NOTICE, "PCU socket connected to external PCU\n");
/* Activate all PDCHs on all BTSs that are served by the PCU */
- if (is_ericsson_bts(bts))
- pdch_act_bts(bts);
+ pdch_act_bts(bts);
return 0;
}
@@ -969,6 +958,11 @@
struct osmo_fd *bfd;
int rc;
+ /* At the moment Ericsson RBS is the only BTS that supports a BSC co-located PCU, do not
allow other BTS models
+ * to establish a connection to an external PCU. */
+ if (!is_ericsson_bts(bts))
+ return -EINVAL;
+
state = talloc_zero(NULL, struct pcu_sock_state);
if (!state)
return -ENOMEM;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/31687
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I18d190d661b06015419078382915c4606be01b04
Gerrit-Change-Number: 31687
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange