From f72bdfaaa98b84d7b2b0fba977af70e2ac82018e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 11 Mar 2018 20:49:19 +0100 Subject: cosmetic: Document some SI scheduling related function API Change-Id: I7e61639349deda28846810c4f52dbea78dccda38 --- src/common/rsl.c | 17 ++++++++++++++++- src/common/sysinfo.c | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/common/rsl.c b/src/common/rsl.c index 47f59d8c..669a39b4 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -496,7 +496,12 @@ static int rsl_rx_sms_bcast_cmd(struct gsm_bts_trx *trx, struct msgb *msg) TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); } -/* 'buf' must be caller-allocated and hold at least len + 2 or sizeof(sysinfo_buf_t) bytes */ +/*! Prefix a given SACCH frame with a L2/LAPDm UI header and store it in given output buffer. + * \param[out] buf Output buffer, must be caller-allocated and hold at least len + 2 or sizeof(sysinfo_buf_t) bytes + * \param[out] valid pointer to bit-mask of 'valid' System information types + * \param[in] current input data (L3 without L2/L1 header) + * \param[in] osmo_si Sytstem Infrormation Type (SYSINFO_TYPE_*) + * \param[in] len length of \a current in octets */ static inline void lapdm_ui_prefix(uint8_t *buf, uint32_t *valid, const uint8_t *current, uint8_t osmo_si, uint16_t len) { /* We have to pre-fix with the two-byte LAPDM UI header */ @@ -514,11 +519,21 @@ static inline void lapdm_ui_prefix(uint8_t *buf, uint32_t *valid, const uint8_t memcpy(buf + 2, current, len); } +/*! Prefix a given SACCH frame with a L2/LAPDm UI header and store it in given BTS SACCH buffer + * \param[out] bts BTS in whose System Information State we shall store + * \param[in] current input data (L3 without L2/L1 header) + * \param[in] osmo_si Sytstem Infrormation Type (SYSINFO_TYPE_*) + * \param[in] len length of \a current in octets */ static inline void lapdm_ui_prefix_bts(struct gsm_bts *bts, const uint8_t *current, uint8_t osmo_si, uint16_t len) { lapdm_ui_prefix(GSM_BTS_SI(bts, osmo_si), &bts->si_valid, current, osmo_si, len); } +/*! Prefix a given SACCH frame with a L2/LAPDm UI header and store it in given lchan SACCH buffer + * \param[out] lchan Logical Channel in whose System Information State we shall store + * \param[in] current input data (L3 without L2/L1 header) + * \param[in] osmo_si Sytstem Infrormation Type (SYSINFO_TYPE_*) + * \param[in] len length of \a current in octets */ static inline void lapdm_ui_prefix_lchan(struct gsm_lchan *lchan, const uint8_t *current, uint8_t osmo_si, uint16_t len) { lapdm_ui_prefix(GSM_LCHAN_SI(lchan, osmo_si), &lchan->si.valid, current, osmo_si, len); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 6f7a3874..35820277 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -160,6 +160,7 @@ uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg) return 1; } +/* obtain the next to-be transmitted dowlink SACCH frame (L2 hdr + L3); returns pointer to lchan->si buffer */ uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) { uint32_t tmp; -- cgit v1.2.3