fix gsm_bts_get_cbch(): CBCH can be allocated on Cn
According to 3GPP TS 45.002, table 3, unlike the CCCH+SDCCH/4+CBCH combination, which can only be allocated on C0/TS0, the SDCCH/8+CBCH can be allocated on C0..n/TS0..3. In other words, having CBCH on e.g. C1/TS2 is perfectly legal. This is why in gsm_bts_get_cbch() we should check all transceivers, not just the C0. Without this change osmo-bts does not send CBCH Load Indications at all if the CBCH is allocated on C1..n. Change-Id: Ib5976783b53521047fbdfc18e0e236e8bce8eaae Related: osmo-bsc.git Ie79ccff4f8f0f1134757ec0c35e18b58081cc158 Related: SYS#5905
This commit is contained in:
parent
b147878f9e
commit
5bb7031366
|
@ -883,22 +883,23 @@ int bts_supports_cm(const struct gsm_bts *bts,
|
|||
/* return the gsm_lchan for the CBCH (if it exists at all) */
|
||||
struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts)
|
||||
{
|
||||
struct gsm_lchan *lchan = NULL;
|
||||
struct gsm_bts_trx *trx = bts->c0;
|
||||
|
||||
/* According to 3GPP TS 45.002, table 3, CBCH can be allocated
|
||||
* either on C0/TS0 (CCCH+SDCCH4) or on C0..n/TS0..3 (SDCCH/8). */
|
||||
if (trx->ts[0].pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH)
|
||||
lchan = &trx->ts[0].lchan[2];
|
||||
else {
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (trx->ts[i].pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH) {
|
||||
lchan = &trx->ts[i].lchan[2];
|
||||
break;
|
||||
}
|
||||
return &trx->ts[0].lchan[2]; /* C0/TS0 */
|
||||
|
||||
llist_for_each_entry(trx, &bts->trx_list, list) { /* C0..n */
|
||||
unsigned int tn;
|
||||
for (tn = 0; tn <= 3; tn++) { /* TS0..3 */
|
||||
struct gsm_bts_trx_ts *ts = &trx->ts[tn];
|
||||
if (ts->pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH)
|
||||
return &ts->lchan[2];
|
||||
}
|
||||
}
|
||||
|
||||
return lchan;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* BCCH carrier power reduction (see 3GPP TS 45.008, section 7.1) */
|
||||
|
|
Loading…
Reference in New Issue