aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-04-04 14:11:33 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:39:05 +0200
commitf449842053d333f6f9f41d3123262e8e05375acb (patch)
tree36abac437062c1b5a8c4747a78e11f897976dab4
parent9cfbf27d4c2b08bec64141c447c59645488bd722 (diff)
Move detection of handover frames from sysmo-bts code to common code
-rw-r--r--src/common/l1sap.c4
-rw-r--r--src/osmo-bts-sysmo/l1_if.c13
2 files changed, 4 insertions, 13 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index b9b63287..ca785fe4 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -762,6 +762,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 97c06a91..e4e5d204 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -836,22 +836,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) {
@@ -878,9 +868,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);
-
switch (data_ind->sapi) {
case GsmL1_Sapi_Sacch:
/*