make channel allocator policy multi-TRX aware

For now, we assume that TRX1 (and higher) all have a TCH/F configuration
on all of their timeslots
This commit is contained in:
Harald Welte 2009-07-29 16:46:37 +02:00
parent 67b4c30a9d
commit d46299da00
1 changed files with 28 additions and 14 deletions

View File

@ -73,20 +73,34 @@ struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts,
/* the following constraints are pure policy,
* no requirement to put this restriction in place */
switch (pchan) {
case GSM_PCHAN_CCCH:
case GSM_PCHAN_CCCH_SDCCH4:
from = 0; to = 0;
break;
case GSM_PCHAN_SDCCH8_SACCH8C:
from = 1; to = 1;
break;
case GSM_PCHAN_TCH_F:
case GSM_PCHAN_TCH_H:
from = 2; to = 7;
break;
default:
return NULL;
if (trx == bts->c0) {
/* On the first TRX we run one CCCH and one SDCCH8 */
switch (pchan) {
case GSM_PCHAN_CCCH:
case GSM_PCHAN_CCCH_SDCCH4:
from = 0; to = 0;
break;
case GSM_PCHAN_SDCCH8_SACCH8C:
from = 1; to = 1;
break;
case GSM_PCHAN_TCH_F:
case GSM_PCHAN_TCH_H:
from = 2; to = 7;
break;
default:
return NULL;
}
} else {
/* Every secondary TRX is configured for TCH/F
* and TCH/H only */
switch (pchan) {
case GSM_PCHAN_TCH_F:
case GSM_PCHAN_TCH_H:
from = 0; to = 7;
break;
default:
return NULL;
}
}
for (j = from; j <= to; j++) {