multi-ARFCN: fix maximum number of carriers limitation
Maximum number of carriers is fixed to 3 channels on a single physical RF channel in multi-ARFCN mode. For some reason, it was limited to 5. Let's fix this, and also follow this limitation in the following VTY command handlers: - cfg_multi_arfcn_cmd, - cfg_chan_cmd. Change-Id: I66a1462f368458afd313ee6f0bc0abc496dde817
This commit is contained in:
parent
5e6f3e0cad
commit
d280045884
|
@ -236,12 +236,16 @@ DEFUN(cfg_multi_arfcn, cfg_multi_arfcn_cmd,
|
|||
|
||||
if (strcmp("disable", argv[0]) == 0) {
|
||||
trx->cfg.multi_arfcn = false;
|
||||
} else if (strcmp("enable", argv[0]) == 0) {
|
||||
trx->cfg.multi_arfcn = true;
|
||||
} else {
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
if (trx->cfg.num_chans > TRX_MCHAN_MAX) {
|
||||
vty_out(vty, "Up to %i channels are supported for multi-TRX mode%s",
|
||||
TRX_MCHAN_MAX, VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
trx->cfg.multi_arfcn = true;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -354,7 +358,12 @@ DEFUN(cfg_chan, cfg_chan_cmd,
|
|||
if (idx >= TRX_CHAN_MAX) {
|
||||
vty_out(vty, "Chan list full.%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
} else if (trx->cfg.multi_arfcn && trx->cfg.num_chans >= TRX_MCHAN_MAX) {
|
||||
vty_out(vty, "Up to %i channels are supported for multi-TRX mode%s",
|
||||
TRX_MCHAN_MAX, VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
if (trx->cfg.num_chans < idx) { /* Unexisting or creating non-consecutive */
|
||||
vty_out(vty, "Non-existent or non-consecutive chan %d.%s",
|
||||
idx, VTY_NEWLINE);
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
|
||||
extern struct vty_app_info g_vty_info;
|
||||
|
||||
/* Maximum number of physical RF channels */
|
||||
#define TRX_CHAN_MAX 8
|
||||
/* Maximum number of carriers in multi-ARFCN mode */
|
||||
#define TRX_MCHAN_MAX 3
|
||||
|
||||
/* Samples-per-symbol for downlink path
|
||||
* 4 - Uses precision modulator (more computation, less distortion)
|
||||
|
|
|
@ -411,7 +411,7 @@ bad_config:
|
|||
|
||||
int trx_validate_config(struct trx_ctx *trx)
|
||||
{
|
||||
if (trx->cfg.multi_arfcn && trx->cfg.num_chans > 5) {
|
||||
if (trx->cfg.multi_arfcn && trx->cfg.num_chans > TRX_MCHAN_MAX) {
|
||||
LOG(ERROR) << "Unsupported number of channels";
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue