aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/pcu_sock.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-10 22:39:15 +0200
committerHarald Welte <laforge@gnumonks.org>2019-03-27 11:19:11 +0000
commit41723e1508d242e774c18dc9b7b0efff70548592 (patch)
treecde76476cfb7f369a6b9d8c0bebe46f78fa2df2d /src/common/pcu_sock.c
parent945c09381d033d142d8e851cd7a4de2e407b61ca (diff)
Forward GPRS SUSPEND REQ from DCCH to PCU socket
As specified in 3GPP TS 03.60 Section 16.2.1 and 44.018 Section 3.4.15, a Class B MS is sending a "RR GPRS SUSPEND REQ" via a DCCH to the BTS if it wants to suspend GPRS services. The BSS is now responsible to somehow forward this to the SGSN. As the Gs interface between BSC and SGSN is both optional and doesn't have any provision to forward this message, we have to send it over to the PCU so it can use regular BSSGP signaling to inform the SGSN of the SUSPEND REQUEST. This patch requires libosmocore Change-Id I90113044460a6c511ced14f588876c4280d1cac7 for the related definition of struct gsm48_gprs_susp_req. Change-Id: I3c1af662c8f0d3d22da200638480f6ef05c3ed1f Closes: OS#2249
Diffstat (limited to 'src/common/pcu_sock.c')
-rw-r--r--src/common/pcu_sock.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 440f561d..d6946028 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -466,6 +466,23 @@ int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len)
return pcu_sock_send(&bts_gsmnet, msg);
}
+/* forward data from a RR GPRS SUSPEND REQ towards PCU */
+int pcu_tx_susp_req(struct gsm_lchan *lchan, uint32_t tlli, const uint8_t *ra_id, uint8_t cause)
+{
+ struct msgb *msg;
+ struct gsm_pcu_if *pcu_prim;
+
+ msg = pcu_msgb_alloc(PCU_IF_MSG_SUSP_REQ, lchan->ts->trx->bts->nr);
+ if (!msg)
+ return -ENOMEM;
+ pcu_prim = (struct gsm_pcu_if *) msg->data;
+ pcu_prim->u.susp_req.tlli = tlli;
+ memcpy(pcu_prim->u.susp_req.ra_id, ra_id, sizeof(pcu_prim->u.susp_req.ra_id));
+ pcu_prim->u.susp_req.cause = cause;
+
+ return pcu_sock_send(&bts_gsmnet, msg);
+}
+
static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
const struct gsm_pcu_if_data *data_req)
{