trxcon/scheduler: FIX: return NULL from TCH dequeue function
Initially it was expected that a TCH transmit queue could contain TCH and FACCH primitives only. But there are also SACCH primitives, which are also being stored there. So, let's drop the assertations from the sched_prim_dequeue_tch(), and return NULL if nothing was found. Change-Id: Iae37057d35883c09a76f0612e52c2d14d9ff91cb
This commit is contained in:
parent
feec102aea
commit
6c0b1261a3
|
@ -141,7 +141,7 @@ int sched_prim_push(struct trx_instance *trx,
|
||||||
* dropped (i.e. replaced).
|
* dropped (i.e. replaced).
|
||||||
*
|
*
|
||||||
* @param queue a transmit queue to take a prim from
|
* @param queue a transmit queue to take a prim from
|
||||||
* @return a FACCH or TCH primitive
|
* @return a FACCH or TCH primitive, otherwise NULL
|
||||||
*/
|
*/
|
||||||
static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
|
static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
|
||||||
{
|
{
|
||||||
|
@ -164,9 +164,6 @@ static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* There should be at least one frame found */
|
|
||||||
OSMO_ASSERT(facch || tch);
|
|
||||||
|
|
||||||
/* Prioritize FACCH */
|
/* Prioritize FACCH */
|
||||||
if (facch && tch) {
|
if (facch && tch) {
|
||||||
/* We found a pair, dequeue both */
|
/* We found a pair, dequeue both */
|
||||||
|
@ -188,8 +185,11 @@ static struct trx_ts_prim *sched_prim_dequeue_tch(struct llist_head *queue)
|
||||||
return tch;
|
return tch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unreachable */
|
/**
|
||||||
OSMO_ASSERT(0);
|
* Nothing was found,
|
||||||
|
* e.g. only SACCH frames are in queue
|
||||||
|
*/
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue