dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/31649 )
Change subject: pcu_l1_if_phy: support multiple BTS (in theory)
......................................................................
pcu_l1_if_phy: support multiple BTS (in theory)
The PCU already has a list that can hold multiple BTS objects but the
API for the direct PHY access has no way to associate a PHY with a
certain BTS object. Lets update the API so that we can associate a BTS
object when opening a PDCH.
Unfortunately OsmoPCU has never been tested with more than one BTS so it
is very likely that there are still shortcomings that prevent OsmoPCU to
work properly when more then one BTS is attached. To make users aware of
this, also print a warning as soon as more than one BTS object exists.
Related: OS#5198
Related: OS#5930
Change-Id: I33518cbbe83f7f8c071afa5e995d30930099ba92
---
M src/osmo-bts-litecell15/lc15_l1_if.c
M src/osmo-bts-oc2g/oc2g_l1_if.c
M src/osmo-bts-sysmo/sysmo_l1_if.c
M src/pcu_l1_if.cpp
M src/pcu_l1_if_phy.h
5 files changed, 29 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/49/31649/1
diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c
index 043a3ba..dca1b77 100644
--- a/src/osmo-bts-litecell15/lc15_l1_if.c
+++ b/src/osmo-bts-litecell15/lc15_l1_if.c
@@ -367,7 +367,7 @@
return 0;
}
-void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
+void *l1if_open_pdch(uint8_t trx_no, uint8_t bts_nr, uint32_t hlayer1, struct gsmtap_inst
*gsmtap)
{
struct lc15l1_hdl *fl1h;
int rc;
diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index c827d72..90e3550 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -372,7 +372,7 @@
return 0;
}
-void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
+void *l1if_open_pdch(uint8_t trx_no, uint8_t bts_nr, uint32_t hlayer1, struct gsmtap_inst
*gsmtap)
{
struct oc2gl1_hdl *fl1h;
int rc;
diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c
index 348497f..5000227 100644
--- a/src/osmo-bts-sysmo/sysmo_l1_if.c
+++ b/src/osmo-bts-sysmo/sysmo_l1_if.c
@@ -352,7 +352,7 @@
return 0;
}
-void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
+void *l1if_open_pdch(uint8_t trx_no, uint8_t bts_nr, uint32_t hlayer1, struct gsmtap_inst
*gsmtap)
{
struct femtol1_hdl *fl1h;
int rc;
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 258a118..c312e91 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -864,7 +864,7 @@
info_ind->trx[trx_nr].hlayer1);
if (!bts->trx[trx_nr].fl1h)
bts->trx[trx_nr].fl1h = l1if_open_pdch(
- trx_nr,
+ trx_nr, bts->nr,
info_ind->trx[trx_nr].hlayer1,
the_pcu->gsmtap);
if (!bts->trx[trx_nr].fl1h) {
@@ -1140,6 +1140,9 @@
}
}
+ if (llist_count(&the_pcu->bts_list) > 1)
+ LOGP(DL1IF, LOGL_ERROR, "more then one BTS regsitered at this PCU. This PCU has
only been tested with one BTS! OS#5930\n");
+
switch (pcu_prim->msg_type) {
case PCU_IF_MSG_DATA_IND:
CHECK_IF_MSG_SIZE(pcu_prim_length, pcu_prim->u.data_ind);
diff --git a/src/pcu_l1_if_phy.h b/src/pcu_l1_if_phy.h
index 297883b..46290b1 100644
--- a/src/pcu_l1_if_phy.h
+++ b/src/pcu_l1_if_phy.h
@@ -4,7 +4,7 @@
#include <osmocom/core/gsmtap_util.h>
int l1if_init(void);
-void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap);
+void *l1if_open_pdch(uint8_t trx_no, uint8_t bts_nr, uint32_t hlayer1, struct gsmtap_inst
*gsmtap);
int l1if_connect_pdch(void *obj, uint8_t ts);
int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn,
uint8_t block_nr, uint8_t *data,
uint8_t len);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/31649
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I33518cbbe83f7f8c071afa5e995d30930099ba92
Gerrit-Change-Number: 31649
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange