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
This commit is contained in:
parent
6f41762717
commit
c82c948e99
|
@ -367,7 +367,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
||||||
{
|
{
|
||||||
struct lc15l1_hdl *fl1h;
|
struct lc15l1_hdl *fl1h;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -372,7 +372,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
||||||
{
|
{
|
||||||
struct oc2gl1_hdl *fl1h;
|
struct oc2gl1_hdl *fl1h;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -352,7 +352,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
|
||||||
{
|
{
|
||||||
struct femtol1_hdl *fl1h;
|
struct femtol1_hdl *fl1h;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -731,6 +731,9 @@ static int pcu_rx_info_ind(struct gprs_rlcmac_bts *bts, const struct gsm_pcu_if_
|
||||||
unsigned int trx_nr, ts_nr;
|
unsigned int trx_nr, ts_nr;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
if (llist_count(&the_pcu->bts_list) > 1)
|
||||||
|
LOGP(DL1IF, LOGL_ERROR, "more than one BTS regsitered at this PCU. This PCU has only been tested with one BTS! OS#5930\n");
|
||||||
|
|
||||||
if (info_ind->version != PCU_IF_VERSION) {
|
if (info_ind->version != PCU_IF_VERSION) {
|
||||||
fprintf(stderr, "PCU interface version number of BTS (%u) is "
|
fprintf(stderr, "PCU interface version number of BTS (%u) is "
|
||||||
"different (%u).\nPlease re-compile!\n",
|
"different (%u).\nPlease re-compile!\n",
|
||||||
|
@ -864,7 +867,7 @@ bssgp_failed:
|
||||||
info_ind->trx[trx_nr].hlayer1);
|
info_ind->trx[trx_nr].hlayer1);
|
||||||
if (!bts->trx[trx_nr].fl1h)
|
if (!bts->trx[trx_nr].fl1h)
|
||||||
bts->trx[trx_nr].fl1h = l1if_open_pdch(
|
bts->trx[trx_nr].fl1h = l1if_open_pdch(
|
||||||
trx_nr,
|
bts->nr, trx_nr,
|
||||||
info_ind->trx[trx_nr].hlayer1,
|
info_ind->trx[trx_nr].hlayer1,
|
||||||
the_pcu->gsmtap);
|
the_pcu->gsmtap);
|
||||||
if (!bts->trx[trx_nr].fl1h) {
|
if (!bts->trx[trx_nr].fl1h) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <osmocom/core/gsmtap_util.h>
|
#include <osmocom/core/gsmtap_util.h>
|
||||||
|
|
||||||
int l1if_init(void);
|
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 bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap);
|
||||||
int l1if_connect_pdch(void *obj, uint8_t ts);
|
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,
|
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);
|
uint8_t len);
|
||||||
|
|
Loading…
Reference in New Issue