diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-01-23 13:14:56 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-01-23 13:16:19 +0100 |
commit | f3e295a24f15e924a89b37ad5a29602973b2a6c9 (patch) | |
tree | 7d2f73577c02cd918c3007d7180fb59d7798c55c /src/osmo-bts-sysmo/l1_if.c | |
parent | 76ba99c3fe89a1491f5cf4e8bc3b521dffdd2dfb (diff) |
wip: Continue with hacks to support handover...
it appears to work without encryption... using the E71
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 957668d9..73e98555 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -47,6 +47,7 @@ #include <osmo-bts/paging.h> #include <osmo-bts/measurement.h> #include <osmo-bts/pcu_if.h> +#include <osmo-bts/handover.h> #include <sysmocom/femtobts/superfemto.h> #include <sysmocom/femtobts/gsml1prim.h> @@ -711,6 +712,9 @@ 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); + switch (data_ind->sapi) { case GsmL1_Sapi_Sacch: radio_link_timeout(lchan, (data_ind->msgUnitParam.u8Size == 0)); @@ -812,12 +816,18 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i return rc; } +static int handle_handover(struct gsm_lchan *lchan, GsmL1_PhRaInd_t *ra_ind) +{ + handover_rach(lchan, ra_ind->msgUnitParam.u8Buffer[0]); + return 0; +} static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind) { struct gsm_bts_trx *trx = fl1->priv; struct gsm_bts *bts = trx->bts; struct gsm_bts_role_bts *btsb = bts->role; + struct gsm_lchan *lchan; struct osmo_phsap_prim pp; struct lapdm_channel *lc; uint8_t acc_delay; @@ -830,6 +840,13 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind) if (ra_ind->measParam.fLinkQuality < fl1->min_qual_rach) return 0; + /* + * Check if this is a handover + */ + lchan = l1if_hLayer_to_lchan(trx, ra_ind->hLayer2); + if (lchan && lchan->ho.active == HANDOVER_ENABLED) + return handle_handover(lchan, ra_ind); + /* increment number of RACH slots with valid RACH burst */ if (trx == bts->c0) btsb->load.rach.access++; |