tbf: Add another variant of the free_all now by pdch
This commit is contained in:
parent
964ddb6aa0
commit
4f6a4e5d6d
|
@ -306,20 +306,12 @@ static int pcu_rx_rach_ind(struct gsm_pcu_if_rach_ind *rach_ind)
|
||||||
|
|
||||||
int flush_pdch(struct gprs_rlcmac_pdch *pdch, uint8_t trx, uint8_t ts)
|
int flush_pdch(struct gprs_rlcmac_pdch *pdch, uint8_t trx, uint8_t ts)
|
||||||
{
|
{
|
||||||
uint8_t tfi;
|
|
||||||
struct gprs_rlcmac_tbf *tbf;
|
|
||||||
struct gprs_rlcmac_paging *pag;
|
struct gprs_rlcmac_paging *pag;
|
||||||
struct gprs_rlcmac_sba *sba, *sba2;
|
struct gprs_rlcmac_sba *sba, *sba2;
|
||||||
|
|
||||||
/* kick all TBF on slot */
|
/* kick all TBF on slot */
|
||||||
for (tfi = 0; tfi < 32; tfi++) {
|
gprs_rlcmac_tbf::free_all(pdch);
|
||||||
tbf = pdch->ul_tbf[tfi];
|
|
||||||
if (tbf)
|
|
||||||
tbf_free(tbf);
|
|
||||||
tbf = pdch->dl_tbf[tfi];
|
|
||||||
if (tbf)
|
|
||||||
tbf_free(tbf);
|
|
||||||
}
|
|
||||||
/* flush all pending paging messages */
|
/* flush all pending paging messages */
|
||||||
while ((pag = gprs_rlcmac_dequeue_paging(pdch)))
|
while ((pag = gprs_rlcmac_dequeue_paging(pdch)))
|
||||||
talloc_free(pag);
|
talloc_free(pag);
|
||||||
|
|
14
src/tbf.cpp
14
src/tbf.cpp
|
@ -251,3 +251,17 @@ void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_trx *trx)
|
||||||
tbf_free(tbf);
|
tbf_free(tbf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_pdch *pdch)
|
||||||
|
{
|
||||||
|
for (uint8_t tfi = 0; tfi < 32; tfi++) {
|
||||||
|
struct gprs_rlcmac_tbf *tbf;
|
||||||
|
|
||||||
|
tbf = pdch->ul_tbf[tfi];
|
||||||
|
if (tbf)
|
||||||
|
tbf_free(tbf);
|
||||||
|
tbf = pdch->dl_tbf[tfi];
|
||||||
|
if (tbf)
|
||||||
|
tbf_free(tbf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ extern struct llist_head gprs_rlcmac_sbas; /* list of single block allocs */
|
||||||
struct gprs_rlcmac_tbf {
|
struct gprs_rlcmac_tbf {
|
||||||
|
|
||||||
static void free_all(struct gprs_rlcmac_trx *trx);
|
static void free_all(struct gprs_rlcmac_trx *trx);
|
||||||
|
static void free_all(struct gprs_rlcmac_pdch *pdch);
|
||||||
|
|
||||||
|
|
||||||
struct llist_head list;
|
struct llist_head list;
|
||||||
|
|
Loading…
Reference in New Issue