Commit 7e2ea2e9 authored by Anilkumar Kolli's avatar Anilkumar Kolli Committed by Kalle Valo

ath11k: Process full monitor mode rx support

In full monitor mode, monitor destination ring is read before monitor
status ring. mon_dst_ring has ppdu id, reap till the end of PPDU. Add
all the MPDUs to list. Start processing the status ring, if PPDU id in
status ring is lagging behind, reap the status ring, once the PPDU ID
matches, deliver the MSDU to upper layer. If status PPDU id leading,
reap the mon_dst_ring.

The advantage with full monitor mode is hardware has status buffers
available for all the MPDUs in mon_dst_ring, which makes it possible
to deliver more frames to be seen on sniffer.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1
Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1638881695-22155-4-git-send-email-akolli@codeaurora.org
parent 88ee00d1
...@@ -1051,6 +1051,7 @@ int ath11k_dp_alloc(struct ath11k_base *ab) ...@@ -1051,6 +1051,7 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
INIT_LIST_HEAD(&dp->reo_cmd_list); INIT_LIST_HEAD(&dp->reo_cmd_list);
INIT_LIST_HEAD(&dp->reo_cmd_cache_flush_list); INIT_LIST_HEAD(&dp->reo_cmd_cache_flush_list);
INIT_LIST_HEAD(&dp->dp_full_mon_mpdu_list);
spin_lock_init(&dp->reo_cmd_lock); spin_lock_init(&dp->reo_cmd_lock);
dp->reo_cmd_cache_flush_count = 0; dp->reo_cmd_cache_flush_count = 0;
......
...@@ -89,6 +89,19 @@ struct dp_tx_ring { ...@@ -89,6 +89,19 @@ struct dp_tx_ring {
int tx_status_tail; int tx_status_tail;
}; };
enum dp_mon_status_buf_state {
/* PPDU id matches in dst ring and status ring */
DP_MON_STATUS_MATCH,
/* status ring dma is not done */
DP_MON_STATUS_NO_DMA,
/* status ring is lagging, reap status ring */
DP_MON_STATUS_LAG,
/* status ring is leading, reap dst ring and drop */
DP_MON_STATUS_LEAD,
/* replinish monitor status ring */
DP_MON_STATUS_REPLINISH,
};
struct ath11k_pdev_mon_stats { struct ath11k_pdev_mon_stats {
u32 status_ppdu_state; u32 status_ppdu_state;
u32 status_ppdu_start; u32 status_ppdu_start;
...@@ -104,6 +117,12 @@ struct ath11k_pdev_mon_stats { ...@@ -104,6 +117,12 @@ struct ath11k_pdev_mon_stats {
u32 dup_mon_buf_cnt; u32 dup_mon_buf_cnt;
}; };
struct dp_full_mon_mpdu {
struct list_head list;
struct sk_buff *head;
struct sk_buff *tail;
};
struct dp_link_desc_bank { struct dp_link_desc_bank {
void *vaddr_unaligned; void *vaddr_unaligned;
void *vaddr; void *vaddr;
...@@ -135,7 +154,11 @@ struct ath11k_mon_data { ...@@ -135,7 +154,11 @@ struct ath11k_mon_data {
u32 mon_last_buf_cookie; u32 mon_last_buf_cookie;
u64 mon_last_linkdesc_paddr; u64 mon_last_linkdesc_paddr;
u16 chan_noise_floor; u16 chan_noise_floor;
bool hold_mon_dst_ring;
enum dp_mon_status_buf_state buf_state;
dma_addr_t mon_status_paddr;
struct dp_full_mon_mpdu *mon_mpdu;
struct hal_sw_mon_ring_entries sw_mon_entries;
struct ath11k_pdev_mon_stats rx_mon_stats; struct ath11k_pdev_mon_stats rx_mon_stats;
/* lock for monitor data */ /* lock for monitor data */
spinlock_t mon_lock; spinlock_t mon_lock;
...@@ -245,6 +268,7 @@ struct ath11k_dp { ...@@ -245,6 +268,7 @@ struct ath11k_dp {
struct hal_wbm_idle_scatter_list scatter_list[DP_IDLE_SCATTER_BUFS_MAX]; struct hal_wbm_idle_scatter_list scatter_list[DP_IDLE_SCATTER_BUFS_MAX];
struct list_head reo_cmd_list; struct list_head reo_cmd_list;
struct list_head reo_cmd_cache_flush_list; struct list_head reo_cmd_cache_flush_list;
struct list_head dp_full_mon_mpdu_list;
u32 reo_cmd_cache_flush_count; u32 reo_cmd_cache_flush_count;
/** /**
* protects access to below fields, * protects access to below fields,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment