diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2023-05-04 17:39:55 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2023-07-21 13:33:36 +0200 |
commit | a0230990df7c5841433bddb329a1301f58db8a35 (patch) | |
tree | 657cf93da8a6baf5ab2ba49079732bf9eb1389d4 | |
parent | 62b9c837218077470f476e784c2341eee04476fa (diff) |
ASCI: Forward RLL to VGCS FSM
RLL events are forwarded to VGCS FSM. Included L3 information are not
forwarded to gsm0408_rcvmsg(), but forwarded to VGCS FSM only.
Change-Id: I5e098a20225ba11206f43281f4da519a4086bae5
Related: OS#4852
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 99c2822a8..ad288abc1 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -58,6 +58,7 @@ #include <osmocom/bsc/power_control.h> #include <osmocom/bsc/chan_counts.h> #include <osmocom/bsc/lchan.h> +#include <osmocom/bsc/vgcs_fsm.h> static void send_lchan_signal(int sig_no, struct gsm_lchan *lchan, struct gsm_meas_rep *resp) @@ -1303,6 +1304,15 @@ static int rsl_rx_conn_fail(struct msgb *msg) break; } + /* Report to VGCS FSM */ + if (lchan_is_asci(lchan)) { + if (lchan->conn && lchan->conn->vgcs_chan.fi) { + uint8_t cause = GSM0808_CAUSE_RADIO_INTERFACE_FAILURE; + osmo_fsm_inst_dispatch(msg->lchan->conn->vgcs_chan.fi, VGCS_EV_TALKER_FAIL, &cause); + } + return 0; + } + /* If the lchan is associated with a conn, we shall notify the MSC of the RSL Conn Failure, and * the connection will presumably be torn down and lead to an lchan release. During initial * Channel Request from the MS, an lchan has no conn yet, so in that case release now. */ @@ -2552,6 +2562,13 @@ static int rsl_rx_rll_err_ind(struct msgb *msg) osmo_fsm_inst_dispatch(msg->lchan->fi, LCHAN_EV_RLL_ERR_IND, &rlm_cause); + /* Report to VGCS FSM */ + if (lchan_is_asci(msg->lchan)) { + if (msg->lchan->conn && msg->lchan->conn->vgcs_chan.fi) { + uint8_t cause = GSM0808_CAUSE_RADIO_INTERFACE_FAILURE; + osmo_fsm_inst_dispatch(msg->lchan->conn->vgcs_chan.fi, VGCS_EV_TALKER_FAIL, &cause); + } + } return 0; } @@ -2579,9 +2596,17 @@ static int abis_rsl_rx_rll(struct msgb *msg) switch (rllh->c.msg_type) { case RSL_MT_DATA_IND: LOG_LCHAN(msg->lchan, LOGL_DEBUG, "SAPI=%u DATA INDICATION\n", sapi); + if (msgb_l2len(msg) > (sizeof(*rllh) + 3) && rllh->data[0] == RSL_IE_L3_INFO) { msg->l3h = &rllh->data[3]; + /* Data message on a VGCS channel is handled by VGCS FSM only. */ + if (lchan_is_asci(msg->lchan)) { + if (msg->lchan->conn && msg->lchan->conn->vgcs_chan.fi) + osmo_fsm_inst_dispatch(msg->lchan->conn->vgcs_chan.fi, VGCS_EV_TALKER_DATA, + msg); + return 0; + } return gsm0408_rcvmsg(msg, rllh->link_id); } break; @@ -2621,6 +2646,13 @@ static int abis_rsl_rx_rll(struct msgb *msg) msg->lchan->sapis[sapi] = LCHAN_SAPI_MS; osmo_fsm_inst_dispatch(msg->lchan->fi, LCHAN_EV_RLL_ESTABLISH_IND, msg); + /* Establishment message on a VGCS channel is handled by VGCS FSM only. */ + if (lchan_is_asci(msg->lchan)) { + if (msg->lchan->conn && msg->lchan->conn->vgcs_chan.fi) + osmo_fsm_inst_dispatch(msg->lchan->conn->vgcs_chan.fi, VGCS_EV_TALKER_EST, msg); + break; + } + if (msgb_l2len(msg) > (sizeof(*rllh) + 3) && rllh->data[0] == RSL_IE_L3_INFO) { msg->l3h = &rllh->data[3]; @@ -2636,6 +2668,14 @@ static int abis_rsl_rx_rll(struct msgb *msg) case RSL_MT_REL_IND: /* BTS informs us of having received DISC from MS */ osmo_fsm_inst_dispatch(msg->lchan->fi, LCHAN_EV_RLL_REL_IND, &rllh->link_id); + + /* Report to VGCS FSM */ + if (lchan_is_asci(msg->lchan)) { + if (msg->lchan->conn && msg->lchan->conn->vgcs_chan.fi) { + uint8_t cause = GSM0808_CAUSE_CALL_CONTROL; + osmo_fsm_inst_dispatch(msg->lchan->conn->vgcs_chan.fi, VGCS_EV_TALKER_REL, &cause); + } + } break; case RSL_MT_REL_CONF: /* BTS informs us of having received UA from MS, |