Commit 95d1f15a authored by Minh-Quang Nguyen's avatar Minh-Quang Nguyen

LC15: proper handling REL_IND

parent 029c46c0
......@@ -586,6 +586,7 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
le = &lchan->lapdm_ch.lapdm_acch;
} else
le = &lchan->lapdm_ch.lapdm_dcch;
rc = lapdm_phsap_dequeue_prim(le, &pp);
if (rc < 0) {
if (L1SAP_IS_LINK_SACCH(link_id)) {
......@@ -664,6 +665,7 @@ static int l1sap_tch_rts_ind(struct gsm_bts_trx *trx,
struct gsm_lchan *lchan;
uint8_t chan_nr, marker = 0;
uint32_t fn;
int rc;
chan_nr = rts_ind->chan_nr;
fn = rts_ind->fn;
......@@ -703,6 +705,16 @@ static int l1sap_tch_rts_ind(struct gsm_bts_trx *trx,
resp_l1sap = msgb_l1sap_prim(resp_msg);
}
/* check for pending REL_IND */
if (lchan->pending_rel_ind.marker) {
LOGP(DRSL, LOGL_INFO, "%s Forward REL_IND to L3\n", gsm_lchan_name(lchan));
lchan->pending_rel_ind.marker = 0;
/* Forward it to L3 */
rc = abis_bts_rsl_sendmsg(lchan->pending_rel_ind.msg);
if (rc < 0)
return rc;
}
memset(resp_l1sap, 0, sizeof(*resp_l1sap));
osmo_prim_init(&resp_l1sap->oph, SAP_GSM_PH, PRIM_TCH, PRIM_OP_REQUEST,
resp_msg);
......
......@@ -2649,15 +2649,25 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx)
}
msg->trx = lchan->ts->trx;
msg->lchan = lchan;
/* check if this is a measurement report from SACCH which needs special
* processing before forwarding */
if (!rslms_is_meas_rep(msg)) {
LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n",
gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
/* REL_IND handling */
if (rh->msg_type == RSL_MT_REL_IND) {
LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n",
gsm_lchan_name(lchan),
rsl_msg_name(rh->msg_type));
return abis_bts_rsl_sendmsg(msg);
lchan->pending_rel_ind.marker = 1;
lchan->pending_rel_ind.msg = msg;
return 0;
}
return abis_bts_rsl_sendmsg(msg);
}
LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to %s MEAS REP\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment