diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2014-04-04 14:11:33 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-04-05 12:48:24 +0200 |
commit | 9d888fbbf8c720471b238a837fd729f9bf7b7373 (patch) | |
tree | 6e1882a4346d6390c61b7f56c87a56e721c32578 | |
parent | d36427dcd546200f6de888fdd1973ad5395fef85 (diff) |
Move detection of handover frames from sysmo-bts code to common code
-rw-r--r-- | src/common/l1sap.c | 5 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 13 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 64c1cf69..5a0cc516 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -44,6 +44,7 @@ #include <osmo-bts/bts.h> #include <osmo-bts/rsl.h> #include <osmo-bts/bts_model.h> +#include <osmo-bts/handover.h> static int l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap); @@ -717,6 +718,10 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx, return -EINVAL; } + /* report first valid received frame to handover process */ + if (lchan->ho.active == HANDOVER_WAIT_FRAME) + handover_frame(lchan); + if (L1SAP_IS_LINK_SACCH(link_id)) { radio_link_timeout(lchan, 0); le = &lchan->lapdm_ch.lapdm_acch; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index e7349232..b7e6b57f 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -766,22 +766,12 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i struct msgb *l1p_msg) { struct gsm_bts_trx *trx = fl1->priv; - struct gsm_lchan *lchan; uint8_t chan_nr, link_id; struct osmo_phsap_prim *l1sap; uint32_t fn; uint8_t *data, len; int rc = 0; - lchan = l1if_hLayer_to_lchan(fl1->priv, data_ind->hLayer2); - if (!lchan) { - LOGP(DL1C, LOGL_ERROR, - "unable to resolve lchan by hLayer2 for 0x%x\n", - data_ind->hLayer2); - msgb_free(l1p_msg); - return -ENODEV; - } - chan_nr = chan_nr_by_sapi(trx->ts[data_ind->u8Tn].pchan, data_ind->sapi, data_ind->subCh, data_ind->u8Tn, data_ind->u32Fn); if (!chan_nr) { @@ -808,9 +798,6 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i data_ind->msgUnitParam.u8Size)); dump_meas_res(LOGL_DEBUG, &data_ind->measParam); - if (lchan->ho.active == HANDOVER_WAIT_FRAME) - handover_frame(lchan); - /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF || data_ind->sapi == GsmL1_Sapi_TchH) { |