qcacmn: check for in use flag during free

Add a in_use flag to identify if a rx desc is associated
with a valid nbuf and use this flag while freeing the nbuf.

Change-Id: Iace002ecadfd95ce60b7d1eaebc42194a433963b
CRs-fixed: 2044907
このコミットが含まれているのは:
Pramod Simha
2017-06-22 17:43:16 -07:00
committed by snandini
コミット 59fcb31d81
5個のファイルの変更18行の追加1行の削除

ファイルの表示

@@ -70,6 +70,7 @@ struct dp_rx_desc {
#ifdef RX_DESC_DEBUG_CHECK
uint32_t magic;
#endif
uint8_t in_use:1;
};
#define RX_DESC_COOKIE_INDEX_SHIFT 0
@@ -322,6 +323,7 @@ void dp_rx_add_to_free_desc_list(union dp_rx_desc_list_elem_t **head,
qdf_assert(head && new);
new->nbuf = NULL;
new->in_use = 0;
((union dp_rx_desc_list_elem_t *)new)->next = *head;
*head = (union dp_rx_desc_list_elem_t *)new;