[overpower] Allow configuring specific channel mode(s)

Change-Id: I34d29d7d0f66c629367f3d6e8a660e199ecbe080
Related: SYS#5319
This commit is contained in:
Vadim Yanitskiy 2021-11-15 00:51:28 +03:00 committed by fixeria
parent 820b30d8c6
commit 335361fbeb
5 changed files with 79 additions and 7 deletions

View File

@ -604,9 +604,11 @@ network
bts 0
overpower dl-acch 2 <1>
overpower rxqual 4 <2>
overpower chan-mode any <3>
----
<1> Overpower of maximum 2 dB for both SACCH and FACCH.
<2> Enable TOP only if RxQual is worse than 4 (BER >= 1.6%).
<3> Permit TOP for any kinds of dedicated channels.
It's also possible to enable TOP only for FACCH or SACCH selectively, or
or keep it enabled permanently regardless of the reported RxQual:

View File

@ -595,6 +595,11 @@ struct gsm_bts {
/* ACCH Temporary overpower capabilities */
struct abis_rsl_osmo_temp_ovp_acch_cap top_acch_cap;
/* Channel mode(s) for which to allow TOP */
enum {
TOP_ACCH_CHAN_MODE_ANY = 0, /* Any kind of channel mode */
TOP_ACCH_CHAN_MODE_SPEECH_V3, /* Speech channels using AMR codec */
} top_acch_chan_mode;
/* MS/BS Power Control parameters */
struct gsm_power_ctrl_params ms_power_ctrl;

View File

@ -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. */

View File

@ -818,6 +818,34 @@ DEFUN_USRATTR(cfg_bts_top_dl_acch_rxqual,
return CMD_SUCCESS;
}
static const struct value_string top_acch_chan_mode_name[] = {
{ TOP_ACCH_CHAN_MODE_ANY, "any" },
{ TOP_ACCH_CHAN_MODE_SPEECH_V3, "speech-amr" },
{ 0, NULL }
};
DEFUN_USRATTR(cfg_bts_top_dl_acch_chan_mode,
cfg_bts_top_dl_acch_chan_mode_cmd,
X(BSC_VTY_ATTR_NEW_LCHAN),
"overpower chan-mode (speech-amr|any)",
TOP_ACCH_STR
"Allow temporary overpower for specific Channel mode(s)\n"
"Speech channels using AMR codec\n"
"Any kind of channel mode (default)\n")
{
struct gsm_bts *bts = vty->index;
if (bts->model->type != GSM_BTS_TYPE_OSMOBTS) {
vty_out(vty, "%% ACCH overpower is not supported by BTS %u%s",
bts->nr, VTY_NEWLINE);
return CMD_WARNING;
}
bts->top_acch_chan_mode = get_string_value(top_acch_chan_mode_name, argv[0]);
return CMD_SUCCESS;
}
#define CD_STR "Channel Description\n"
DEFUN_USRATTR(cfg_bts_chan_desc_att,
@ -4311,6 +4339,10 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
mode, top->overpower_db, VTY_NEWLINE);
vty_out(vty, " overpower rxqual %u%s",
top->rxqual, VTY_NEWLINE);
vty_out(vty, " overpower chan-mode %s%s",
get_value_string(top_acch_chan_mode_name,
bts->top_acch_chan_mode),
VTY_NEWLINE);
}
if (bts->rep_acch_cap.dl_facch_all)
@ -4531,6 +4563,7 @@ int bts_vty_init(void)
install_element(BTS_NODE, &cfg_bts_top_dl_acch_cmd);
install_element(BTS_NODE, &cfg_bts_top_no_dl_acch_cmd);
install_element(BTS_NODE, &cfg_bts_top_dl_acch_rxqual_cmd);
install_element(BTS_NODE, &cfg_bts_top_dl_acch_chan_mode_cmd);
install_element(BTS_NODE, &cfg_bts_interf_meas_avg_period_cmd);
install_element(BTS_NODE, &cfg_bts_interf_meas_level_bounds_cmd);
install_element(BTS_NODE, &cfg_bts_srvcc_fast_return_cmd);

View File

@ -12,15 +12,17 @@ OsmoBSC(config-net-bts)# list with-flags
. ..l overpower (dl-acch|dl-sacch|dl-facch) <1-4>
. ..l no overpower dl-acch
. ..l overpower rxqual (0|1|2|3|4|5|6|7)
. ..l overpower chan-mode (speech-amr|any)
...
OsmoBSC(config-net-bts)# overpower?
overpower Temporary ACCH overpower
OsmoBSC(config-net-bts)# overpower ?
dl-acch Enable overpower for both SACCH and FACCH
dl-sacch Enable overpower for SACCH only
dl-facch Enable overpower for FACCH only
rxqual Set RxQual (BER) threshold (default 4)
dl-acch Enable overpower for both SACCH and FACCH
dl-sacch Enable overpower for SACCH only
dl-facch Enable overpower for FACCH only
rxqual Set RxQual (BER) threshold (default 4)
chan-mode Allow temporary overpower for specific Channel mode(s)
OsmoBSC(config-net-bts)# overpower dl-acch ?
<1-4> Overpower value in dB
@ -29,18 +31,21 @@ OsmoBSC(config-net-bts)# show running-config
...
overpower dl-acch 2
overpower rxqual 4
overpower chan-mode any
...
OsmoBSC(config-net-bts)# overpower dl-sacch 3
OsmoBSC(config-net-bts)# show running-config
...
overpower dl-sacch 3
overpower rxqual 4
overpower chan-mode any
...
OsmoBSC(config-net-bts)# overpower dl-facch 4
OsmoBSC(config-net-bts)# show running-config
...
overpower dl-facch 4
overpower rxqual 4
overpower chan-mode any
...
OsmoBSC(config-net-bts)# overpower rxqual ?
@ -57,12 +62,25 @@ OsmoBSC(config-net-bts)# show running-config
...
overpower dl-facch 4
overpower rxqual 0
overpower chan-mode any
...
OsmoBSC(config-net-bts)# overpower rxqual 7
OsmoBSC(config-net-bts)# show running-config
...
overpower dl-facch 4
overpower rxqual 7
overpower chan-mode any
...
OsmoBSC(config-net-bts)# overpower chan-mode ?
speech-amr Speech channels using AMR codec
any Any kind of channel mode (default)
OsmoBSC(config-net-bts)# overpower chan-mode speech-amr
OsmoBSC(config-net-bts)# show running-config
...
overpower dl-facch 4
overpower rxqual 7
overpower chan-mode speech-amr
...
OsmoBSC(config-net-bts)# no overpower dl-acch