aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-03-06 16:14:08 +0100
committerHarald Welte <laforge@gnumonks.org>2017-05-29 11:11:36 +0000
commit538475259cb7c86225c2e1f582ef5f64c69d20ca (patch)
tree083bb25db05de13d7f00990ccc33dc22d2aa4938 /src
parent524e3e31700c92c8dedb5b72201d209055953b85 (diff)
octphy: remove old event control code
Event handling is done internally in the Octasic BTS. When the TRX is opened, events are enabled automatically and when TRX is closed events are disabled. The change is valid for the recent firmware version and for the last couple of previous releases. Change-Id: I0652627495f6a9bcb0da2431b8beb839bc22062b
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-octphy/l1_oml.c84
1 files changed, 1 insertions, 83 deletions
diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c
index 47274e09..4652e103 100644
--- a/src/osmo-bts-octphy/l1_oml.c
+++ b/src/osmo-bts-octphy/l1_oml.c
@@ -1089,84 +1089,6 @@ int l1if_rsl_chan_act(struct gsm_lchan *lchan)
return 0;
}
-static int enable_events_compl_cb(struct octphy_hdl *fl1, struct msgb *resp, void *data)
-{
- tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP *mser =
- (tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP *) resp->l2h;
-
- /* in a completion call-back, we take msgb ownership and must
- * release it before returning */
-
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP_SWAP(mser);
-
- LOGP(DL1C, LOGL_INFO, "Rx ENABLE-EVT-REC.resp\n");
-
- msgb_free(resp);
-
- return 0;
-}
-
-static int disable_events_compl_cb(struct octphy_hdl *fl1, struct msgb *resp, void *data)
-{
- tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP *mser =
- (tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP *) resp->l2h;
-
- /* in a completion call-back, we take msgb ownership and must
- * release it before returning */
-
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_RSP_SWAP(mser);
-
- LOGP(DL1C, LOGL_INFO, "Rx DISABLE-EVT-REC.resp\n");
-
- msgb_free(resp);
-
- return 0;
-}
-
-int l1if_enable_events(struct gsm_bts_trx *trx)
-{
- struct phy_instance *pinst = trx_phy_instance(trx);
- struct octphy_hdl *fl1h = pinst->phy_link->u.octphy.hdl;
- struct msgb *msg = l1p_msgb_alloc();
- tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD *mse;
-
- mse = (tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD *)
- msgb_put(msg, sizeof(*mse));
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD_DEF(mse);
-
- l1if_fill_msg_hdr(&mse->Header, msg, fl1h, cOCTVC1_MSG_TYPE_COMMAND,
- cOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CID);
- mse->ulEvtActiveFlag = cOCT_TRUE;
-
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD_SWAP(mse);
-
- LOGP(DL1C, LOGL_INFO, "Tx ENABLE-EVT-REC.req\n");
-
- return l1if_req_compl(fl1h, msg, disable_events_compl_cb, 0);
-}
-
-int l1if_disable_events(struct gsm_bts_trx *trx)
-{
- struct phy_instance *pinst = trx_phy_instance(trx);
- struct octphy_hdl *fl1h = pinst->phy_link->u.octphy.hdl;
- struct msgb *msg = l1p_msgb_alloc();
- tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD *mse;
-
- mse = (tOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD *)
- msgb_put(msg, sizeof(*mse));
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD_DEF(mse);
-
- l1if_fill_msg_hdr(&mse->Header, msg, fl1h, cOCTVC1_MSG_TYPE_COMMAND,
- cOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CID);
- mse->ulEvtActiveFlag = cOCT_FALSE;
-
- mOCTVC1_MAIN_MSG_API_SYSTEM_MODIFY_SESSION_EVT_CMD_SWAP(mse);
-
- LOGP(DL1C, LOGL_INFO, "Tx DISABLE-EVT-REC.req\n");
-
- return l1if_req_compl(fl1h, msg, disable_events_compl_cb, 0);
-}
-
#define talloc_replace(dst, ctx, src) \
do { \
if (dst) \
@@ -1353,8 +1275,7 @@ static int trx_open_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp, void *d
octphy_hw_get_clock_sync_info(fl1h);
fl1h->opened = 1;
- /* Temporary fix for enabling events after TRX Close + Reopen */
- return l1if_enable_events(trx);
+ return 0;
}
int l1if_trx_open(struct gsm_bts_trx *trx)
@@ -1628,9 +1549,6 @@ int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
int bts_model_trx_close(struct gsm_bts_trx *trx)
{
- /* disable events */
- l1if_disable_events(trx);
-
/* FIXME: close only one TRX */
return trx_close(trx);
}