dyn PDCH: Fix free slot search for chan_alloc_reverse == true
For chan_alloc_reverse, _lc_find_trx() should return the last free slot instead of the first. Original patch by jolly, but split in two by nhofmeyr. Change-Id: Iff980242b9b5cb39345aaad0350ee368537677cd
This commit is contained in:
parent
ec744655b4
commit
0434efa077
|
@ -75,12 +75,24 @@ static struct gsm_lchan *
|
||||||
_lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan)
|
_lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan)
|
||||||
{
|
{
|
||||||
struct gsm_bts_trx_ts *ts;
|
struct gsm_bts_trx_ts *ts;
|
||||||
int j, ss;
|
int j, start, stop, dir, ss;
|
||||||
|
|
||||||
if (!trx_is_usable(trx))
|
if (!trx_is_usable(trx))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (j = 0; j < 8; j++) {
|
if (trx->bts->chan_alloc_reverse) {
|
||||||
|
/* check TS 7..0 */
|
||||||
|
start = 7;
|
||||||
|
stop = -1;
|
||||||
|
dir = -1;
|
||||||
|
} else {
|
||||||
|
/* check TS 0..7 */
|
||||||
|
start = 0;
|
||||||
|
stop = 8;
|
||||||
|
dir = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (j = start; j != stop; j += dir) {
|
||||||
ts = &trx->ts[j];
|
ts = &trx->ts[j];
|
||||||
if (!ts_is_usable(ts))
|
if (!ts_is_usable(ts))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue