HO: add indicators for inter-cell and async ho, use for chan act type
Change-Id: I2d91765c1f9719c64fd99426a872cecc724215db
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index cad0144..f525b21 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -48,6 +48,9 @@
struct osmo_timer_list T3103;
uint8_t ho_ref;
+
+ bool inter_cell;
+ bool async;
};
static LLIST_HEAD(bsc_handovers);
@@ -125,6 +128,10 @@
ho->old_lchan = old_lchan;
ho->new_lchan = new_lchan;
ho->ho_ref = ho_ref++;
+ if (old_lchan->ts->trx->bts != bts) {
+ ho->inter_cell = true;
+ ho->async = true;
+ }
/* copy some parameters from old lchan */
memcpy(&new_lchan->encr, &old_lchan->encr, sizeof(new_lchan->encr));
@@ -139,7 +146,11 @@
new_lchan->conn->ho_lchan = new_lchan;
/* FIXME: do we have a better idea of the timing advance? */
- rc = rsl_chan_activate_lchan(new_lchan, RSL_ACT_INTER_ASYNC, ho->ho_ref);
+ rc = rsl_chan_activate_lchan(new_lchan,
+ ho->inter_cell
+ ? (ho->async ? RSL_ACT_INTER_ASYNC : RSL_ACT_INTER_SYNC)
+ : RSL_ACT_INTRA_IMM_ASS,
+ ho->ho_ref);
if (rc < 0) {
LOGP(DHO, LOGL_ERROR, "could not activate channel\n");
new_lchan->conn->ho_lchan = NULL;