aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-20 20:59:08 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-21 00:31:11 +0200
commit067824841f6b1139e3a926b355826454a3f371b2 (patch)
treee91b1d5195d14420699a7fa303340e8e4169d5c0 /src/common/rsl.c
parent89bfea63c9e4e3a308288fcb98e48bf88919e246 (diff)
cbch: Support Extended CBCH
The logic for Extended CBCH are the same as for the Basic CBCH, we just need to * duplicate our related state * parse the optional RSL_IE_SMSCB_CHAN_INDICATOR IE * start to send data on the Extended CBCH (TB=4..7) Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Closes: OS#3535
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 8021d2d4..364e8291 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -487,6 +487,7 @@ static int rsl_rx_sms_bcast_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
struct abis_rsl_cchan_hdr *cch = msgb_l2(msg);
struct tlv_parsed tp;
struct rsl_ie_cb_cmd_type *cb_cmd_type;
+ bool extended_cbch = false;
int rc;
rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg));
@@ -495,11 +496,16 @@ static int rsl_rx_sms_bcast_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
!TLVP_PRESENT(&tp, RSL_IE_SMSCB_MSG))
return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg);
+ if (TLVP_PRESENT(&tp, RSL_IE_SMSCB_CHAN_INDICATOR)) {
+ if ((*TLVP_VAL(&tp, RSL_IE_SMSCB_CHAN_INDICATOR) & 0x0f) == 0x01)
+ extended_cbch = true;
+ }
+
cb_cmd_type = (struct rsl_ie_cb_cmd_type *)
TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE);
- rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG),
- TLVP_VAL(&tp, RSL_IE_SMSCB_MSG));
+ rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, extended_cbch,
+ TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), TLVP_VAL(&tp, RSL_IE_SMSCB_MSG));
if (rc < 0)
return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg);