pcu_sock: Forward imm.ass PCU originated messages
The PCU sends imm.ass messages in response to a rach request. Those
messages need to be forwarded to RSL in order to get them send. This
commit introduces the required functionality for that
Change-Id: Ice099c4ed7008200ed179e581aba1899c6c29455
diff --git a/openbsc/src/libbsc/pcu_sock.c b/openbsc/src/libbsc/pcu_sock.c
index 0ae3a03..7e77797 100644
--- a/openbsc/src/libbsc/pcu_sock.c
+++ b/openbsc/src/libbsc/pcu_sock.c
@@ -286,6 +286,27 @@
return pcu_sock_send(bts, msg);
}
+/* Confirm the sending of an immediate assignment to the pcu */
+int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli)
+{
+ struct msgb *msg;
+ struct gsm_pcu_if *pcu_prim;
+ struct gsm_pcu_if_data_cnf_dt *data_cnf_dt;
+
+ LOGP(DPCU, LOGL_INFO, "Sending PCH confirm with direct TLLI\n");
+
+ msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_DT, bts->nr);
+ if (!msg)
+ return -ENOMEM;
+ pcu_prim = (struct gsm_pcu_if *) msg->data;
+ data_cnf_dt = &pcu_prim->u.data_cnf_dt;
+
+ data_cnf_dt->sapi = PCU_IF_SAPI_PCH;
+ data_cnf_dt->tlli = tlli;
+
+ return pcu_sock_send(bts, msg);
+}
+
/* we need to decode the raw RR paging messsage (see PCU code
* Encoding::write_paging_request) and extract the mobile identity
* (P-TMSI) from it */