From 660116fb9d7b382808377274ae4aed7c45e980e3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 29 Dec 2014 01:02:29 +0100 Subject: CBCH: Implement CBCH block segmentation and RSL_MT_SMS_BC_CMD * CBCH load indications are not yet sent * The queue length is not yet limited! --- include/osmo-bts/Makefile.am | 2 +- include/osmo-bts/bts.h | 1 - include/osmo-bts/cbch.h | 16 ++++++++++++++++ include/osmo-bts/gsm_data.h | 6 ++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 include/osmo-bts/cbch.h (limited to 'include') diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index a55e6421..67fd2bf1 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ - handover.h msg_utils.h tx_power.h control_if.h + handover.h msg_utils.h tx_power.h control_if.h cbch.h diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index de4870f9..e4899736 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -33,7 +33,6 @@ int bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt uint8_t *bts_sysinfo_get(struct gsm_bts *bts, struct gsm_time *g_time); uint8_t *lchan_sacch_get(struct gsm_lchan *lchan); -int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time); int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h new file mode 100644 index 00000000..b4ac409f --- /dev/null +++ b/include/osmo-bts/cbch.h @@ -0,0 +1,16 @@ +#pragma once + +#include +#include + +#include +#include + +/* incoming SMS broadcast command from RSL */ +int bts_process_smscb_cmd(struct gsm_bts *bts, + struct rsl_ie_cb_cmd_type cmd_type, + uint8_t msg_len, const uint8_t *msg); + +/* call-back from bts model specific code when it wants to obtain a CBCH + * block for a given gsm_time. outbuf must have 23 bytes of space. */ +int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time); diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 5e0af775..0562ecaf 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -14,6 +14,7 @@ #define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91 struct pcu_sock_state; +struct smscb_msg; struct gsm_network { struct llist_head bts_list; @@ -84,6 +85,11 @@ struct gsm_bts_role_bts { /* used by the sysmoBTS to adjust band */ uint8_t auto_band; + + struct { + struct llist_head queue; /* list of struct smscb_msg */ + struct smscb_msg *cur_msg; /* current SMS-CB */ + } smscb_state; }; enum lchan_ciph_state { -- cgit v1.2.3