Initial attempt to retain LCLS during HO

This commit is contained in:
Keith Whyte 2022-10-07 04:30:59 +01:00
parent ad27ef2b15
commit 9a415c7fef
3 changed files with 23 additions and 2 deletions

View File

@ -1523,7 +1523,9 @@ static int abis_rsl_rx_dchan(struct msgb *msg)
return -EINVAL;
}
LOG_LCHAN(msg->lchan, LOGL_DEBUG, "Rx %s\n", rsl_or_ipac_msg_name(rslh->c.msg_type));
/* I want to see LCHAN at DEBUG, but MEAS_RES makes too much noise. */
if (rslh->c.msg_type != RSL_MT_MEAS_RES)
LOG_LCHAN(msg->lchan, LOGL_DEBUG, "Rx %s\n", rsl_or_ipac_msg_name(rslh->c.msg_type));
if (!msg->lchan->fi) {
LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL DCHAN: RSL message for unconfigured lchan\n");

View File

@ -589,6 +589,16 @@ static void gscon_fsm_handover(struct osmo_fsm_inst *fi, uint32_t event, void *d
case GSCON_EV_HANDOVER_END:
osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
gscon_dtap_queue_flush(conn, 1);
if (conn->lcls.fi->state != ST_LOCALLY_SWITCHED) {
struct osmo_lcls new_cfg = {
.config = GSM0808_LCLS_CFG_BOTH_WAY,
.control = GSM0808_LCLS_CSC_CONNECT,
};
osmo_fsm_inst_dispatch(conn->lcls.fi, LCLS_EV_UPDATE_CFG_CSC, &new_cfg);
if (conn->lcls.other) {
osmo_fsm_inst_dispatch(conn->lcls.other->lcls.fi, LCLS_EV_UPDATE_CFG_CSC, &new_cfg);
}
}
return;
case GSCON_EV_MO_DTAP:

View File

@ -328,7 +328,16 @@ void handover_start(struct handover_out_req *req)
return;
}
handover_reset(conn);
/* When Starting HandOver, internally release LCLS on both legs.
* FIXME: What if both legs are not local? */
if (conn->lcls.fi->state == ST_LOCALLY_SWITCHED) {
conn->lcls.control = GSM0808_LCLS_CSC_RELEASE_LCLS;
osmo_fsm_inst_dispatch(conn->lcls.fi, LCLS_EV_APPLY_CFG_CSC, NULL);
if (conn->lcls.other) {
conn->lcls.other->lcls.control = GSM0808_LCLS_CSC_RELEASE_LCLS;
osmo_fsm_inst_dispatch(conn->lcls.other->lcls.fi, LCLS_EV_APPLY_CFG_CSC, NULL);
}
}
/* When handover_start() is invoked by the gscon, it expects a HANDOVER_END event. The best way to ensure this
* is to always create a handover_fsm instance, even if the target cell is not resolved yet. Any failure should
* then call handover_end(), which ensures that the conn snaps back to a valid state. */