diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-11-15 00:51:28 +0300 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2021-11-15 11:59:03 +0000 |
commit | 335361fbeba32dcd3daded0db40cd15af4410ced (patch) | |
tree | aba4f7563988be861eaec396f7aee4a1e45a0eae /src/osmo-bsc/abis_rsl.c | |
parent | 820b30d8c6ec04ebc98a3bfe5b3edbc84e7a1d4d (diff) |
[overpower] Allow configuring specific channel mode(s)
Change-Id: I34d29d7d0f66c629367f3d6e8a660e199ecbe080
Related: SYS#5319
Diffstat (limited to 'src/osmo-bsc/abis_rsl.c')
-rw-r--r-- | src/osmo-bsc/abis_rsl.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index f93dee250..52008a5ba 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -554,7 +554,9 @@ static void put_rep_acch_cap_ie(const struct gsm_lchan *lchan, } /* indicate Temporary overpower of SACCH and FACCH channels */ -static void put_top_acch_cap_ie(const struct gsm_lchan *lchan, struct msgb *msg) +static void put_top_acch_cap_ie(const struct gsm_lchan *lchan, + const struct rsl_ie_chan_mode *cm, + struct msgb *msg) { const struct gsm_bts *bts = lchan->ts->trx->bts; @@ -562,6 +564,18 @@ static void put_top_acch_cap_ie(const struct gsm_lchan *lchan, struct msgb *msg) if (!(bts->model->type == GSM_BTS_TYPE_OSMOBTS && osmo_bts_has_feature(&bts->features, BTS_FEAT_ACCH_TEMP_OVP))) return; + /* Check if TOP is permitted for the given Channel Mode */ + switch (bts->top_acch_chan_mode) { + case TOP_ACCH_CHAN_MODE_SPEECH_V3: + if (cm->spd_ind != RSL_CMOD_SPD_SPEECH) + return; + if (cm->chan_rate != RSL_CMOD_SP_GSM3) + return; + break; + case TOP_ACCH_CHAN_MODE_ANY: + break; + } + msgb_tlv_put(msg, RSL_IE_OSMO_TEMP_OVP_ACCH_CAP, sizeof(bts->top_acch_cap), (void *)&bts->top_acch_cap); @@ -700,7 +714,7 @@ int rsl_tx_chan_activ(struct gsm_lchan *lchan, uint8_t act_type, uint8_t ho_ref) } put_rep_acch_cap_ie(lchan, msg); - put_top_acch_cap_ie(lchan, msg); + put_top_acch_cap_ie(lchan, &cm, msg); /* Selecting a specific TSC Set is only applicable to VAMOS mode */ if (lchan->activate.info.vamos && lchan->activate.tsc_set >= 1) @@ -772,7 +786,7 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan) } put_rep_acch_cap_ie(lchan, msg); - put_top_acch_cap_ie(lchan, msg); + put_top_acch_cap_ie(lchan, &cm, msg); /* Selecting a specific TSC Set is only applicable to VAMOS mode. Send this Osmocom specific IE only to OsmoBTS * types. */ |