pcu_l1_if_phy: fix API function names

The functions l1if_open_pdch and l1if_close_pdch have a misleading
naming since what they actually do is opening and closing the TRX since
they return and accept a context (obj) that is valid for a whole TRX.
This also explains why the other functions accept a timeslot as
parameter in addition to the context. Let's rename those functions so
that it is clear what they do.

Related: OS#6022
Change-Id: I395a60b2fba39bac4facec78989bac20f0cef0d3
This commit is contained in:
Philipp Maier 2023-04-25 09:41:17 +02:00
parent 5e024342c4
commit 6ee8d136d3
19 changed files with 35 additions and 35 deletions

View File

@ -184,7 +184,7 @@ static int add_i460_subslot(void *ctx, struct er_ccu_descr *ccu_descr)
enum osmo_tray_sync_pat_id sync_pattern;
if (ccu_descr->link.schan) {
/* NOTE: This is a serious error: subslots should be removed when l1if_close_pdch() is called by the
/* NOTE: This is a serious error: subslots should be removed when l1if_close_trx() is called by the
* PCU. This log line points towards a problem with the PDCH management inside the PCU! */
LOGPCCU(ccu_descr, LOGL_ERROR, "SETUP", "I.460 subslot is already configured -- will not touch it!\n");
return -EINVAL;

View File

@ -452,7 +452,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
return 0;
}
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
void *l1if_open_trx(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
{
struct er_trx_descr *trx_descr;
unsigned int i;
@ -475,7 +475,7 @@ void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gs
return trx_descr;
}
int l1if_close_pdch(void *obj)
int l1if_close_trx(void *obj)
{
struct er_trx_descr *trx_descr = obj;
unsigned int i;

View File

@ -367,7 +367,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
return 0;
}
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
void *l1if_open_trx(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
{
struct lc15l1_hdl *fl1h;
int rc;
@ -396,7 +396,7 @@ void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gs
return fl1h;
}
int l1if_close_pdch(void *obj)
int l1if_close_trx(void *obj)
{
struct lc15l1_hdl *fl1h = obj;
if (fl1h)

View File

@ -372,7 +372,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
return 0;
}
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
void *l1if_open_trx(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
{
struct oc2gl1_hdl *fl1h;
int rc;
@ -401,7 +401,7 @@ void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gs
return fl1h;
}
int l1if_close_pdch(void *obj)
int l1if_close_trx(void *obj)
{
struct oc2gl1_hdl *fl1h = obj;
if (fl1h)

View File

@ -352,7 +352,7 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
return 0;
}
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
void *l1if_open_trx(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
{
struct femtol1_hdl *fl1h;
int rc;
@ -378,7 +378,7 @@ void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gs
return fl1h;
}
int l1if_close_pdch(void *obj)
int l1if_close_trx(void *obj)
{
struct femtol1_hdl *fl1h = obj;
if (fl1h)

View File

@ -111,7 +111,7 @@ static void pcu_sock_close(int lost)
for (trx = 0; trx < 8; trx++) {
#ifdef ENABLE_DIRECT_PHY
if (bts->trx[trx].fl1h) {
l1if_close_pdch(bts->trx[trx].fl1h);
l1if_close_trx(bts->trx[trx].fl1h);
bts->trx[trx].fl1h = NULL;
}
#endif

View File

@ -884,7 +884,7 @@ bssgp_failed:
LOGP(DL1IF, LOGL_DEBUG, " TRX %d hlayer1=%x\n", trx_nr,
info_ind->trx[trx_nr].hlayer1);
if (!bts->trx[trx_nr].fl1h)
bts->trx[trx_nr].fl1h = l1if_open_pdch(
bts->trx[trx_nr].fl1h = l1if_open_trx(
bts->nr, trx_nr,
info_ind->trx[trx_nr].hlayer1,
the_pcu->gsmtap);

View File

@ -4,9 +4,9 @@
#include <osmocom/core/gsmtap_util.h>
int l1if_init(void);
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap);
void *l1if_open_trx(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_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);
int l1if_disconnect_pdch(void *obj, uint8_t ts);
int l1if_close_pdch(void *obj);
int l1if_close_trx(void *obj);

View File

@ -928,6 +928,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -176,6 +176,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -217,6 +217,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -1428,6 +1428,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -172,6 +172,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -174,10 +174,10 @@ extern "C" {
} void l1if_disconnect_pdch() {
abort();
}
void l1if_close_pdch() {
void l1if_close_trx() {
abort();
}
void l1if_open_pdch() {
void l1if_open_trx() {
abort();
}
}

View File

@ -382,6 +382,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -574,6 +574,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -3531,6 +3531,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -994,6 +994,6 @@ extern "C" {
void l1if_pdch_req() { abort(); }
void l1if_connect_pdch() { abort(); }
void l1if_disconnect_pdch() { abort(); }
void l1if_close_pdch() { abort(); }
void l1if_open_pdch() { abort(); }
void l1if_close_trx() { abort(); }
void l1if_open_trx() { abort(); }
}

View File

@ -349,10 +349,10 @@ extern "C" {
} void l1if_disconnect_pdch() {
abort();
}
void l1if_close_pdch() {
void l1if_close_trx() {
abort();
}
void l1if_open_pdch() {
void l1if_open_trx() {
abort();
}
}