qcacmn: Add history to track the entries in rx rings

The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.

Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.

Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
此提交包含在:
Rakesh Pillai
2020-07-23 10:34:03 +05:30
提交者 snandini
父節點 bc798a3c5c
當前提交 9beeaa95a7
共有 6 個檔案被更改,包括 262 行新增1 行删除

查看文件

@@ -2242,6 +2242,24 @@ void dp_set_max_page_size(struct qdf_mem_multi_page_t *pages,
}
#endif /* MAX_ALLOC_PAGE_SIZE */
/**
* dp_history_get_next_index() - get the next entry to record an entry
* in the history.
* @curr_idx: Current index where the last entry is written.
* @max_entries: Max number of entries in the history
*
* This function assumes that the max number os entries is a power of 2.
*
* Returns: The index where the next entry is to be written.
*/
static inline uint32_t dp_history_get_next_index(qdf_atomic_t *curr_idx,
uint32_t max_entries)
{
uint32_t idx = qdf_atomic_inc_return(curr_idx);
return idx & (max_entries - 1);
}
/**
* dp_rx_skip_tlvs() - Skip TLVs len + L2 hdr_offset, save in nbuf->cb
* @nbuf: nbuf cb to be updated