aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/abis_rsl.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-08-30 10:53:58 +0200
committerlaforge <laforge@osmocom.org>2021-09-02 17:44:54 +0000
commit034cc1216a2938ac52c82ff1dafaa78d527e3b48 (patch)
tree09697b5406836064b012295b151ca62680210f53 /src/osmo-bsc/abis_rsl.c
parentfecf321a250681b6bd9a755e86b7e0a3a32df1a8 (diff)
bty_vty: add VTY settungs for temporary overpower
To configure temporary overpower, new VTY commands are added. This patch also addes the logic needed to attach the temporary overpower IE to the RSL CHANNEL ACTIVATE message. Change-Id: I488a91bb4ed86f630db56564a0cd293f39f0f690 Related: SYS#5319
Diffstat (limited to 'src/osmo-bsc/abis_rsl.c')
-rw-r--r--src/osmo-bsc/abis_rsl.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 26231ac9d..c7399ebef 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -548,6 +548,35 @@ static void rep_acch_cap_for_bts(struct gsm_lchan *lchan,
}
}
+/* indicate Temporary overpower of SACCH and FACCH channels */
+static void top_acch_cap_for_bts(struct gsm_lchan *lchan, struct msgb *msg)
+{
+ struct abis_rsl_osmo_temp_ovp_acch_cap cap;
+ struct gsm_bts *bts = lchan->ts->trx->bts;
+ bool acch_rep_enabled;
+ bool acch_rep_supp_by_ms;
+
+ /* The BTS_FEAT_ACCH_TEMP_OVP IE is a proprietary IE, that can only be used with osmo-bts type BTSs */
+ if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS && osmo_bts_has_feature(&bts->features, BTS_FEAT_ACCH_TEMP_OVP)))
+ return;
+
+ memcpy(&cap, &bts->temporary_overpower, sizeof(cap));
+
+ /* The user has enabled one of the two downlink related ACCH repetition features. */
+ acch_rep_enabled = bts->repeated_acch_policy.dl_sacch || bts->repeated_acch_policy.dl_facch_all
+ || bts->repeated_acch_policy.dl_facch_cmd;
+
+ /* The MS indicates support for ACCH repetition */
+ acch_rep_supp_by_ms = lchan->conn && lchan->conn->cm3_valid && lchan->conn->cm3.repeated_acch_capability;
+
+ /* If the MS fully supports repeated ACCH capabilites as specified in 3GPP TS 44.006, section 10 and 11. and if
+ * ACCH repetition is enabled for this BTS, then we will not apply temporary overpower. */
+ if (acch_rep_enabled && acch_rep_supp_by_ms)
+ cap.overpower_db = 0;
+
+ msgb_tlv_put(msg, RSL_IE_OSMO_TEMP_OVP_ACCH_CAP, sizeof(cap), (uint8_t*) &cap);
+}
+
/* Write RSL_IE_OSMO_TRAINING_SEQUENCE to msgb. The tsc_set argument's range is 1-4, tsc argument range is 0-7. */
static void put_osmo_training_sequence_ie(struct msgb *msg, uint8_t tsc_set, uint8_t tsc)
{
@@ -675,6 +704,7 @@ int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t ho_ref)
}
rep_acch_cap_for_bts(lchan, msg);
+ top_acch_cap_for_bts(lchan, msg);
/* Selecting a specific TSC Set is only applicable to VAMOS mode */
if (lchan->activate.info.vamos && lchan->activate.tsc_set >= 1)
@@ -746,6 +776,7 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
}
rep_acch_cap_for_bts(lchan, msg);
+ top_acch_cap_for_bts(lchan, msg);
/* Selecting a specific TSC Set is only applicable to VAMOS mode. Send this Osmocom specific IE only to OsmoBTS
* types. */