From 2588b2abf6fc53eef581c0c92a62fb37628be276 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 5 Sep 2019 14:00:09 +0200 Subject: pcu_interface: Forward ETWS Primary Notification to PCU All MS/UE must be notified of ETWS Primary Notifiations. Depending on their state, the notification goes different paths: * CS dedicated mode: BSC sends it as L3 message over LAPDm / DCCH * CS/PS idle mode: BTS sends paging messages on PCH * PS TBF active: PCU send Packet Application Info This enables the last of the three methods by passing any ETWS Primary Notifications received over RSL via the PCU socket into the PCU. Change-Id: Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6 Related: OS#4047, OS#4048 --- src/common/pcu_sock.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/common/pcu_sock.c') diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 84a98f5e..ba9e1721 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -290,6 +290,27 @@ static int pcu_if_signal_cb(unsigned int subsys, unsigned int signal, return 0; } +int pcu_tx_app_info_req(struct gsm_bts *bts, uint8_t app_type, uint8_t len, const uint8_t *app_data) +{ + struct gsm_pcu_if_app_info_req *ai_req; + struct gsm_pcu_if *pcu_prim; + struct msgb *msg; + + if (app_type & 0xF0 || len > sizeof(ai_req->data)) + return -EINVAL; + + msg = pcu_msgb_alloc(PCU_IF_MSG_APP_INFO_REQ, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + ai_req = &pcu_prim->u.app_info_req; + + ai_req->application_type = app_type; + ai_req->len = len; + memcpy(ai_req->data, app_data, ai_req->len); + + return pcu_sock_send(&bts_gsmnet, msg); +} int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr) -- cgit v1.2.3