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
此提交包含在:
@@ -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
|
||||
|
新增問題並參考
封鎖使用者