dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/31573 )
Change subject: pcu_l1_if_phy: add new PHY API function to disconnect PDCH
......................................................................
pcu_l1_if_phy: add new PHY API function to disconnect PDCH
There is a function l1if_connect_pdch, but no complementary function
like we have it with l1if_open_pdch and l1if_close_pdch. The reason for
this is that the PHY implementations that rely on a femtocell DSP do not
need to disconnect the pdch explcitly. However, the planned support for
the E1 based Ercisson RBS CCU will require an explicit disconnect. So
lets add a function call for this.
Change-Id: Ied88f3289bda87c48f5f9255c4591470633cc805
Related: OS#5198
---
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
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
16 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/73/31573/1
diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c
index 053844f..580cdf0 100644
--- a/src/osmo-bts-litecell15/lc15_l1_if.c
+++ b/src/osmo-bts-litecell15/lc15_l1_if.c
@@ -145,6 +145,11 @@
return l1if_req_pdch(fl1h, msg);
}
+int l1if_disconnect_pdch(void *obj, uint8_t ts)
+{
+ return 0;
+}
+
static int handle_ph_readytosend_ind(struct lc15l1_hdl *fl1h,
GsmL1_PhReadyToSendInd_t *rts_ind)
{
diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index 1ea0b26..48005a2 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -146,6 +146,11 @@
return l1if_req_pdch(fl1h, msg);
}
+int l1if_disconnect_pdch(void *obj, uint8_t ts)
+{
+ return 0;
+}
+
static int handle_ph_readytosend_ind(struct oc2gl1_hdl *fl1h,
GsmL1_PhReadyToSendInd_t *rts_ind)
{
diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c
index 31028f5..18378b6 100644
--- a/src/osmo-bts-sysmo/sysmo_l1_if.c
+++ b/src/osmo-bts-sysmo/sysmo_l1_if.c
@@ -128,6 +128,11 @@
return l1if_req_pdch(fl1h, msg);
}
+int l1if_disconnect_pdch(void *obj, uint8_t ts)
+{
+ return 0;
+}
+
static int handle_ph_readytosend_ind(struct femtol1_hdl *fl1h,
GsmL1_PhReadyToSendInd_t *rts_ind)
{
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index fdee83d..258a118 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -918,6 +918,10 @@
trx_nr, ts_nr, pdch->tsc, pdch->fh.enabled ? "yes" :
"no");
} else {
if (pdch->is_enabled()) {
+#ifdef ENABLE_DIRECT_PHY
+ if ((info_ind->flags & PCU_IF_FLAG_SYSMO))
+ l1if_disconnect_pdch(bts->trx[trx_nr].fl1h, ts_nr);
+#endif
pcu_tx_act_req(bts, pdch, 0);
pdch->disable();
}
diff --git a/src/pcu_l1_if_phy.h b/src/pcu_l1_if_phy.h
index 73d0b6f..318d0aa 100644
--- a/src/pcu_l1_if_phy.h
+++ b/src/pcu_l1_if_phy.h
@@ -7,4 +7,5 @@
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);
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 21fa6f2..08f5910 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -861,6 +861,7 @@
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(); }
}
diff --git a/tests/alloc/MslotTest.cpp b/tests/alloc/MslotTest.cpp
index 1b06b0b..1d5ff97 100644
--- a/tests/alloc/MslotTest.cpp
+++ b/tests/alloc/MslotTest.cpp
@@ -175,6 +175,7 @@
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(); }
}
diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp
index 668b081..659c011 100644
--- a/tests/app_info/AppInfoTest.cpp
+++ b/tests/app_info/AppInfoTest.cpp
@@ -198,6 +198,7 @@
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(); }
}
diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp
index dd318c0..4cc7960 100644
--- a/tests/edge/EdgeTest.cpp
+++ b/tests/edge/EdgeTest.cpp
@@ -1427,6 +1427,7 @@
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(); }
}
diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp
index b08c31d..c1ccf07 100644
--- a/tests/emu/pcu_emu.cpp
+++ b/tests/emu/pcu_emu.cpp
@@ -170,6 +170,7 @@
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(); }
}
diff --git a/tests/fn/FnTest.cpp b/tests/fn/FnTest.cpp
index ae15164..f4b998c 100644
--- a/tests/fn/FnTest.cpp
+++ b/tests/fn/FnTest.cpp
@@ -171,6 +171,8 @@
abort();
} void l1if_connect_pdch() {
abort();
+ } void l1if_disconnect_pdch() {
+ abort();
}
void l1if_close_pdch() {
abort();
diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp
index bdc5863..547dc79 100644
--- a/tests/llc/LlcTest.cpp
+++ b/tests/llc/LlcTest.cpp
@@ -381,6 +381,7 @@
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(); }
}
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index cbafee9..6a770c9 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -661,6 +661,7 @@
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(); }
}
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index aa3c121..0b2e868 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -3517,6 +3517,7 @@
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(); }
}
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index c728af1..a4f6db6 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -975,6 +975,7 @@
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(); }
}
diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp
index a199311..44aef34 100644
--- a/tests/ulc/PdchUlcTest.cpp
+++ b/tests/ulc/PdchUlcTest.cpp
@@ -338,6 +338,8 @@
abort();
} void l1if_connect_pdch() {
abort();
+ } void l1if_disconnect_pdch() {
+ abort();
}
void l1if_close_pdch() {
abort();
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/31573
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ied88f3289bda87c48f5f9255c4591470633cc805
Gerrit-Change-Number: 31573
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange