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
diff --git a/dp/wifi3.0/dp_rx.h b/dp/wifi3.0/dp_rx.h
index 50359eb..a2e8986 100644
--- a/dp/wifi3.0/dp_rx.h
+++ b/dp/wifi3.0/dp_rx.h
@@ -70,6 +70,7 @@
#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 @@
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;