pcu_sock: guard against too many TRX
The pcuif only supports a limited but sufficient number of TRXs. When filling in the TRX array in info_ind, we must guard against overflowing the maximum number of TRXs Change-Id: I351080a112f3d3fdf833ee7fa0d77c4cd1d13e42 Related: OS#5198
This commit is contained in:
parent
0b7d9b26b6
commit
a8ad2b1b93
|
@ -226,6 +226,12 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
|
|||
trx = gsm_bts_trx_num(bts, i);
|
||||
if (!trx)
|
||||
continue;
|
||||
if (trx->nr >= ARRAY_SIZE(info_ind->trx)) {
|
||||
LOG_TRX(trx, DPCU, LOGL_NOTICE, "PCU interface (version %u) "
|
||||
"cannot handle more than %zu transceivers => skipped\n",
|
||||
PCU_IF_VERSION, ARRAY_SIZE(info_ind->trx));
|
||||
break;
|
||||
}
|
||||
info_ind->trx[i].hlayer1 = 0x2342;
|
||||
info_ind->trx[i].pdch_mask = 0;
|
||||
info_ind->trx[i].arfcn = trx->arfcn;
|
||||
|
|
Loading…
Reference in New Issue