diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2013-04-05 19:03:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-01-22 17:19:13 +0100 |
commit | 5d74d347b5c93cbeae75642b1de7b1b9fc657c2e (patch) | |
tree | ace83137d21d5c85f8ec47a302b880b7f51b4221 | |
parent | 3c8ff3c70bc52d0a1d75a1e6b87b0069d92f10f9 (diff) |
Merge part of incomplete handover code from Harald
* Check if channel activation is handover and save ho ref in lchan
* Acticate RACH for RX uplink if the channel activation is for handover
Holger:
* Merge parts of "Handover support to commong part of BTS code" from
Andreas.
-rw-r--r-- | src/common/bts.c | 1 | ||||
-rw-r--r-- | src/common/rsl.c | 11 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/oml.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/common/bts.c b/src/common/bts.c index 2ac411d0..2b9042de 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -74,6 +74,7 @@ int bts_init(struct gsm_bts *bts) load_timer_start(bts); btsb->rtp_jitter_buf_ms = 100; btsb->max_ta = 63; + btsb->ny1 = 4; /* default RADIO_LINK_TIMEOUT */ btsb->radio_link_timeout = 32; diff --git a/src/common/rsl.c b/src/common/rsl.c index b8e4c23c..6bb043fd 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -711,6 +711,13 @@ static int rsl_rx_chan_activ(struct msgb *msg) memset(&lchan->encr, 0, sizeof(lchan->encr)); /* 9.3.9 Handover Reference */ + if ((type == RSL_ACT_INTER_ASYNC || + type == RSL_ACT_INTER_SYNC) && + TLVP_PRESENT(&tp, RSL_IE_HANDO_REF)) { + lchan->ho.active = 1; + lchan->ho.ref = *TLVP_VAL(&tp, RSL_IE_HANDO_REF); + LOGP(DRSL, LOGL_INFO, "Channel activation due to handover (id %i)", lchan->ho.ref); + } /* 9.3.4 BS Power */ if (TLVP_PRESENT(&tp, RSL_IE_BS_POWER)) @@ -803,6 +810,10 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan) msgb_queue_flush(&lchan->dl_tch_queue); } + /* deactivate handover RACH detection and timer */ + lchan->ho.active = 0; + osmo_timer_del(&lchan->ho.t3105); + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; rc = bts_model_rsl_chan_rel(lchan); diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 6e33a76b..dc633841 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -815,6 +815,7 @@ static void lchan2lch_par(GsmL1_LogChParam_t *lch_par, struct gsm_lchan *lchan) static int mph_send_activate_req(struct gsm_lchan *lchan, struct sapi_cmd *cmd) { struct femtol1_hdl *fl1h = trx_femtol1_hdl(lchan->ts->trx); + struct msgb *msg = l1p_msgb_alloc(); int sapi = cmd->sapi; int dir = cmd->dir; @@ -1296,7 +1297,6 @@ static int mph_send_deactivate_req(struct gsm_lchan *lchan, struct sapi_cmd *cmd struct femtol1_hdl *fl1h = trx_femtol1_hdl(lchan->ts->trx); struct msgb *msg = l1p_msgb_alloc(); GsmL1_MphDeactivateReq_t *deact_req; - deact_req = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphDeactivateReq, fl1h); deact_req->u8Tn = lchan->ts->nr; deact_req->subCh = lchan_to_GsmL1_SubCh_t(lchan); |