VTY: make target uplink Rx level VTY-configurable

We used to have -75 dBm as the target value for the uplink receive
level.  Now this is configurable.

The parameter is used as input into the power control loop that adjusts
the MS transmit power in order to achieve the target rx value on the
BTS Rx input.
This commit is contained in:
Harald Welte 2012-11-10 18:15:35 +01:00
parent 7350736054
commit ce826f3fc4
4 changed files with 19 additions and 1 deletions

View File

@ -1181,6 +1181,7 @@ struct femtol1_hdl *l1if_open(void *priv)
fl1h->priv = priv;
fl1h->clk_cal = 0;
fl1h->ul_power_target = -75; /* dBm default */
/* default clock source: OCXO */
#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0)
fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo;

View File

@ -32,6 +32,7 @@ struct femtol1_hdl {
uint32_t hLayer1; /* handle to the L1 instance in the DSP */
uint32_t dsp_trace_f;
int clk_cal;
int ul_power_target;
uint8_t clk_src;
char *calib_path;
struct llist_head wlc_list;

View File

@ -279,7 +279,7 @@ static int trx_init(struct gsm_bts_trx *trx)
dev_par->u16Arfcn = trx->arfcn;
dev_par->u16BcchArfcn = trx->bts->c0->arfcn;
dev_par->u8NbTsc = trx->bts->bsic & 7;
dev_par->fRxPowerLevel = -75.f;
dev_par->fRxPowerLevel = fl1h->ul_power_target;
dev_par->fTxPowerLevel = trx->nominal_power - trx->max_power_red;
LOGP(DL1C, LOGL_NOTICE, "Init TRX (ARFCN %u, TSC %u, RxPower % 2f dBm, "
"TxPower % 2.2f dBm\n", dev_par->u16Arfcn, dev_par->u8NbTsc,

View File

@ -161,6 +161,19 @@ DEFUN(cfg_trx_cal_path, cfg_trx_cal_path_cmd,
return CMD_SUCCESS;
}
DEFUN(cfg_trx_ul_power_target, cfg_trx_ul_power_target_cmd,
"uplink-power-target <-110-0>",
"Set the nominal target Rx Level for uplink power control loop\n"
"Target uplink Rx level in dBm\n")
{
struct gsm_bts_trx *trx = vty->index;
struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
fl1h->ul_power_target = atoi(argv[0]);
return CMD_SUCCESS;
}
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@ -414,6 +427,8 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
vty_out(vty, " clock-source %s%s",
get_value_string(femtobts_clksrc_names, fl1h->clk_src),
VTY_NEWLINE);
vty_out(vty, " uplink-power-target %d%s", fl1h->ul_power_target,
VTY_NEWLINE);
for (i = 0; i < 32; i++) {
if (fl1h->gsmtap_sapi_mask & (1 << i)) {
@ -475,6 +490,7 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_cal_path_cmd);
install_element(TRX_NODE, &cfg_trx_gsmtap_sapi_cmd);
install_element(TRX_NODE, &cfg_trx_no_gsmtap_sapi_cmd);
install_element(TRX_NODE, &cfg_trx_ul_power_target_cmd);
return 0;
}