dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32426 )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: pcu_l1_if_phy: fix API function names ......................................................................
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 --- M src/ericsson-rbs/er_ccu_if.c M src/ericsson-rbs/er_ccu_l1_if.c 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/osmobts_sock.c M src/pcu_l1_if.cpp M src/pcu_l1_if_phy.h M tests/alloc/AllocTest.cpp M tests/alloc/MslotTest.cpp M tests/app_info/AppInfoTest.cpp M tests/edge/EdgeTest.cpp M tests/emu/pcu_emu.cpp M tests/fn/FnTest.cpp M tests/llc/LlcTest.cpp M tests/ms/MsTest.cpp M tests/tbf/TbfTest.cpp M tests/types/TypesTest.cpp M tests/ulc/PdchUlcTest.cpp 19 files changed, 52 insertions(+), 35 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/ericsson-rbs/er_ccu_if.c b/src/ericsson-rbs/er_ccu_if.c index aa659a3..fb5b1b4 100644 --- a/src/ericsson-rbs/er_ccu_if.c +++ b/src/ericsson-rbs/er_ccu_if.c @@ -184,7 +184,7 @@ 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; diff --git a/src/ericsson-rbs/er_ccu_l1_if.c b/src/ericsson-rbs/er_ccu_l1_if.c index 0fe30b2..1a1f8e4 100644 --- a/src/ericsson-rbs/er_ccu_l1_if.c +++ b/src/ericsson-rbs/er_ccu_l1_if.c @@ -452,7 +452,7 @@ 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 @@ 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; diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index dce9e53..3b8b21b 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 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 @@ return fl1h; }
-int l1if_close_pdch(void *obj) +int l1if_close_trx(void *obj) { struct lc15l1_hdl *fl1h = obj; if (fl1h) diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index 93b4654..2c9da72 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 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 @@ return fl1h; }
-int l1if_close_pdch(void *obj) +int l1if_close_trx(void *obj) { struct oc2gl1_hdl *fl1h = obj; if (fl1h) diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 99ccf9a..e97b9bd 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 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 @@ return fl1h; }
-int l1if_close_pdch(void *obj) +int l1if_close_trx(void *obj) { struct femtol1_hdl *fl1h = obj; if (fl1h) diff --git a/src/osmobts_sock.c b/src/osmobts_sock.c index bf1fbb4..c4a042f 100644 --- a/src/osmobts_sock.c +++ b/src/osmobts_sock.c @@ -111,7 +111,7 @@ 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 diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index bb0a309..a830c31 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -884,7 +884,7 @@ 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); diff --git a/src/pcu_l1_if_phy.h b/src/pcu_l1_if_phy.h index 7eba5cc..08b7d23 100644 --- a/src/pcu_l1_if_phy.h +++ b/src/pcu_l1_if_phy.h @@ -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); diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index ed13a91..8d833f5 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -928,6 +928,6 @@ 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(); } } diff --git a/tests/alloc/MslotTest.cpp b/tests/alloc/MslotTest.cpp index 1d5ff97..cb294f0 100644 --- a/tests/alloc/MslotTest.cpp +++ b/tests/alloc/MslotTest.cpp @@ -176,6 +176,6 @@ 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(); } } diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp index 72b8a0c..4f928b3 100644 --- a/tests/app_info/AppInfoTest.cpp +++ b/tests/app_info/AppInfoTest.cpp @@ -217,6 +217,6 @@ 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(); } } diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp index edce20f..55bf2a7 100644 --- a/tests/edge/EdgeTest.cpp +++ b/tests/edge/EdgeTest.cpp @@ -1428,6 +1428,6 @@ 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(); } } diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp index e136969..2704bc9 100644 --- a/tests/emu/pcu_emu.cpp +++ b/tests/emu/pcu_emu.cpp @@ -172,6 +172,6 @@ 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(); } } diff --git a/tests/fn/FnTest.cpp b/tests/fn/FnTest.cpp index f4b998c..fa7c105 100644 --- a/tests/fn/FnTest.cpp +++ b/tests/fn/FnTest.cpp @@ -174,10 +174,10 @@ } void l1if_disconnect_pdch() { abort(); } - void l1if_close_pdch() { + void l1if_close_trx() { abort(); } - void l1if_open_pdch() { + void l1if_open_trx() { abort(); } } diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp index 3ceb17b..554c749 100644 --- a/tests/llc/LlcTest.cpp +++ b/tests/llc/LlcTest.cpp @@ -382,6 +382,6 @@ 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(); } } diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index ea54a12..f051401 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -574,6 +574,6 @@ 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(); } } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index b482878..bbd6821 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -3531,6 +3531,6 @@ 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(); } } diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 5690839..871e0d1 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -994,6 +994,6 @@ 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(); } } diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp index 47b8855..7d649b0 100644 --- a/tests/ulc/PdchUlcTest.cpp +++ b/tests/ulc/PdchUlcTest.cpp @@ -349,10 +349,10 @@ } void l1if_disconnect_pdch() { abort(); } - void l1if_close_pdch() { + void l1if_close_trx() { abort(); } - void l1if_open_pdch() { + void l1if_open_trx() { abort(); } }