diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-05-21 02:38:43 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-23 19:16:11 +0000 |
commit | 590b23ce3c78d8cca5baa15f92019edf74a9323c (patch) | |
tree | 1315f0bc45d13541ab39551bb43b0c05b1bd2520 /src/common/rsl.c | |
parent | d7be09caf8d49ac65ed626bca9de2fb738a365b6 (diff) |
cbch: Add counters; queue length limits and CBCH LOAD reporting
This adds the final missing part to full CBCH support:
* keep a tab on the current queue length for basic + extended CBCH
* keep rate counters about the number of sent / transmitted SMSCB
* send CBCH LOAD information via RSL to the BSC
Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r-- | src/common/rsl.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index 364e8291..af0b72d1 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1636,6 +1636,32 @@ static int rsl_rx_sacch_inf_mod(struct msgb *msg) return 0; } +/* 8.5.8 CBCH Load Information */ +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount) +{ + struct gsm_lchan *lchan = gsm_bts_get_cbch(bts); + struct msgb *msg; + uint8_t load_info; + + msg = rsl_msgb_alloc(sizeof(struct abis_rsl_cchan_hdr)); + if (!msg) + return -ENOMEM; + + /* 9.3.1 Channel Number */ + rsl_cch_push_hdr(msg, RSL_MT_CBCH_LOAD_IND, gsm_lchan2chan_nr(lchan)); + + /* 9.3.43 CBCH Load Information */ + load_info = ((overflow & 1) << 7) | (amount & 0x0F); + msgb_tv_put(msg, RSL_IE_CBCH_LOAD_INFO, load_info); + /* 9.3.44 SMSCB Channel Indicator */ + if (ext_cbch) + msgb_tv_put(msg, RSL_IE_SMSCB_CHAN_INDICATOR, 0x01); + + msg->trx = bts->c0; + + return abis_bts_rsl_sendmsg(msg); +} + /* * ip.access related messages */ |