jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/33613 )


Change subject: ASCI: Forward RLL to VGCS FSM
......................................................................

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
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 53 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/13/33613/1

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 1b02450..fcc6f51 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 @@
                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 @@

        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 @@
        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 @@
                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 @@
        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,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33613
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5e098a20225ba11206f43281f4da519a4086bae5
Gerrit-Change-Number: 33613
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <[email protected]>
Gerrit-MessageType: newchange

Reply via email to