From 7d88844909ce52dcf936d7cd233df555f58a998f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 6 Sep 2019 23:18:27 +0200 Subject: SMSCB: Send ETWS Primary Notifiation via RSL to BTS In addition to transmission of the ETWS Primary Notification via all dedicated channels, we also need to send it to the BTS for transmission via PCH (P1 Rest Octets) and for forwarding to PCU for PACCH transmission. Change-Id: I7e45b0373458a4348b12b92dd92861062532548b --- src/osmo-bsc/abis_rsl.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/osmo-bsc/abis_rsl.c') diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 06d19a5d5..4a7d104e8 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2203,6 +2203,25 @@ int abis_rsl_rcvmsg(struct msgb *msg) return rc; } +/* Send an Osmocom-specific Abis RSL message for ETWS Primary Notification */ +int rsl_etws_pn_command(struct gsm_bts *bts, uint8_t chan_nr, const uint8_t *data, int len) +{ + struct abis_rsl_dchan_hdr *dh; + struct msgb *msg = rsl_msgb_alloc(); + if (!msg) + return -1; + dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); + init_dchan_hdr(dh, RSL_MT_OSMO_ETWS_CMD); + dh->c.msg_discr = ABIS_RSL_MDISC_COM_CHAN; + dh->chan_nr = chan_nr; + + msgb_tlv_put(msg, RSL_IE_SMSCB_MSG, len, data); + + msg->dst = bts->c0->rsl_link; + + return abis_rsl_sendmsg(msg); +} + int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, bool use_extended_cbch, const uint8_t *data, int len) -- cgit v1.2.3