mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacmn: free all the ast entries before freeing ast table
While freeing the AST table traverse through table and free any AST entries present in the table Change-Id: I87382da2425380938d91ee1980a9c356c0f647ef CRs-fixed: 2275212
This commit is contained in:
parent
ed35f4499d
commit
157543d36f
1 changed files with 18 additions and 0 deletions
|
|
@ -248,6 +248,24 @@ static inline void dp_peer_ast_cleanup(struct dp_soc *soc,
|
|||
*/
|
||||
static void dp_peer_ast_hash_detach(struct dp_soc *soc)
|
||||
{
|
||||
unsigned int index;
|
||||
struct dp_ast_entry *ast, *ast_next;
|
||||
|
||||
if (!soc->ast_hash.mask)
|
||||
return;
|
||||
|
||||
for (index = 0; index <= soc->ast_hash.mask; index++) {
|
||||
if (!TAILQ_EMPTY(&soc->ast_hash.bins[index])) {
|
||||
TAILQ_FOREACH_SAFE(ast, &soc->ast_hash.bins[index],
|
||||
hash_list_elem, ast_next) {
|
||||
TAILQ_REMOVE(&soc->ast_hash.bins[index], ast,
|
||||
hash_list_elem);
|
||||
dp_peer_ast_cleanup(soc, ast);
|
||||
qdf_mem_free(ast);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qdf_mem_free(soc->ast_hash.bins);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue