aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-08-30 17:49:30 +0200
committerfixeria <vyanitskiy@sysmocom.de>2021-09-29 07:54:45 +0000
commit1f213a24023ab01d277c6c58b19bc122cf5b90d1 (patch)
tree13760cd2b5a48d5fb4e580676a83b5caf9145435
parentd680a629753ed9ce79252b3cbb0c4ccd0de16f00 (diff)
rsl: parse temporary overpower value RSL CHAN ACT / MODIFY
The temporary overpower value that is to be used with FACCH and SACCH is transferred using a proprietary RSL IE (RSL_IE_OSMO_TOP_ACCH_CAP). The parsed value is then stored in lchan->bs_acch_overpower_db so that it can be used. Change-Id: I426c2510865c4a986c68f2027cc676aaac0d8a4c Related: SYS#5319
-rw-r--r--src/common/rsl.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index e13160e1..d50983d9 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1596,6 +1596,26 @@ static void parse_repeated_acch_capability(struct gsm_lchan *lchan, struct tlv_p
sizeof(lchan->repeated_acch_capability));
}
+/* Parse RSL_IE_OSMO_TOP_ACCH_CAP */
+static int parse_temporary_overpower_acch_capability(struct gsm_lchan *lchan,
+ const struct tlv_parsed *tp)
+{
+ struct abis_rsl_osmo_temp_ovp_acch_cap *top;
+
+ lchan->bs_acch_overpower_db = 0;
+
+ if (!TLVP_PRES_LEN(tp, RSL_IE_OSMO_TEMP_OVP_ACCH_CAP, sizeof(*top)))
+ return 0;
+
+ if (!osmo_bts_has_feature(lchan->ts->trx->bts->features, BTS_FEAT_ACCH_TEMP_OVP))
+ return -RSL_ERR_OPT_IE_ERROR;
+
+ top = (struct abis_rsl_osmo_temp_ovp_acch_cap *)TLVP_VAL(tp, RSL_IE_OSMO_TEMP_OVP_ACCH_CAP);
+ lchan->bs_acch_overpower_db = top->overpower_db;
+
+ return 0;
+}
+
/* 8.4.1 CHANnel ACTIVation is received */
static int rsl_rx_chan_activ(struct msgb *msg)
{
@@ -1896,6 +1916,9 @@ static int rsl_rx_chan_activ(struct msgb *msg)
lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
parse_repeated_acch_capability(lchan, &tp);
+ rc = parse_temporary_overpower_acch_capability(lchan, &tp);
+ if (rc < 0)
+ return rsl_tx_chan_act_acknack(lchan, -rc);
/* actually activate the channel in the BTS */
rc = l1sap_chan_act(lchan->ts->trx, dch->chan_nr, &tp);
@@ -2220,6 +2243,9 @@ static int rsl_rx_mode_modif(struct msgb *msg)
/* 9.3.54 Supported Codec Types */
parse_repeated_acch_capability(lchan, &tp);
+ rc = parse_temporary_overpower_acch_capability(lchan, &tp);
+ if (rc < 0)
+ return rsl_tx_mode_modif_nack(lchan, -rc);
l1sap_chan_modify(lchan->ts->trx, dch->chan_nr);