aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-05-04 16:35:17 +0200
committerlaforge <laforge@osmocom.org>2023-07-21 11:14:44 +0000
commit2193f98f3e279e75a68110b1b2a05bc0d323ce2b (patch)
tree380dc9d673f92c05a627872722b65e0992177969
parent2436f40b4cf5b875700ab0e62bff5f7eb6a7ddc0 (diff)
ASCI: Add TX support for UPLINK RELEASE message
-rw-r--r--include/osmocom/bsc/gsm_04_08_rr.h1
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h
index 7d68fc85f..c0f8d4b93 100644
--- a/include/osmocom/bsc/gsm_04_08_rr.h
+++ b/include/osmocom/bsc/gsm_04_08_rr.h
@@ -33,6 +33,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
int gsm48_send_rr_app_info(struct gsm_lchan *lchan, uint8_t apdu_id, uint8_t apdu_flags,
const uint8_t *apdu_data, ssize_t apdu_data_len);
int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode);
+int gsm48_send_uplink_release(struct gsm_lchan *lchan, uint8_t cause);
int gsm48_rx_rr_modif_ack(struct msgb *msg);
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 8395dcfa2..ae54cf504 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -746,6 +746,21 @@ int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode)
return gsm48_sendmsg(msg);
}
+/* TS 44.018 section 9.1.48 */
+int gsm48_send_uplink_release(struct gsm_lchan *lchan, uint8_t cause)
+{
+ struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 UL RELEASE");
+ struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
+
+ msg->lchan = lchan;
+ gh->proto_discr = GSM48_PDISC_RR;
+ gh->msg_type = GSM48_MT_RR_UPLINK_RELEASE;
+
+ msgb_put_u8(msg, cause);
+
+ return gsm48_sendmsg(msg);
+}
+
int gsm48_rx_rr_modif_ack(struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);