Skip to content

Commit 7e2ea2e

Browse files
Anilkumar Kollikvalo
authored andcommitted
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: Anilkumar Kolli <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 88ee00d commit 7e2ea2e

File tree

3 files changed

+433
-3
lines changed

3 files changed

+433
-3
lines changed

drivers/net/wireless/ath/ath11k/dp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,7 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
10511051

10521052
INIT_LIST_HEAD(&dp->reo_cmd_list);
10531053
INIT_LIST_HEAD(&dp->reo_cmd_cache_flush_list);
1054+
INIT_LIST_HEAD(&dp->dp_full_mon_mpdu_list);
10541055
spin_lock_init(&dp->reo_cmd_lock);
10551056

10561057
dp->reo_cmd_cache_flush_count = 0;

drivers/net/wireless/ath/ath11k/dp.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ struct dp_tx_ring {
8989
int tx_status_tail;
9090
};
9191

92+
enum dp_mon_status_buf_state {
93+
/* PPDU id matches in dst ring and status ring */
94+
DP_MON_STATUS_MATCH,
95+
/* status ring dma is not done */
96+
DP_MON_STATUS_NO_DMA,
97+
/* status ring is lagging, reap status ring */
98+
DP_MON_STATUS_LAG,
99+
/* status ring is leading, reap dst ring and drop */
100+
DP_MON_STATUS_LEAD,
101+
/* replinish monitor status ring */
102+
DP_MON_STATUS_REPLINISH,
103+
};
104+
92105
struct ath11k_pdev_mon_stats {
93106
u32 status_ppdu_state;
94107
u32 status_ppdu_start;
@@ -104,6 +117,12 @@ struct ath11k_pdev_mon_stats {
104117
u32 dup_mon_buf_cnt;
105118
};
106119

120+
struct dp_full_mon_mpdu {
121+
struct list_head list;
122+
struct sk_buff *head;
123+
struct sk_buff *tail;
124+
};
125+
107126
struct dp_link_desc_bank {
108127
void *vaddr_unaligned;
109128
void *vaddr;
@@ -135,7 +154,11 @@ struct ath11k_mon_data {
135154
u32 mon_last_buf_cookie;
136155
u64 mon_last_linkdesc_paddr;
137156
u16 chan_noise_floor;
138-
157+
bool hold_mon_dst_ring;
158+
enum dp_mon_status_buf_state buf_state;
159+
dma_addr_t mon_status_paddr;
160+
struct dp_full_mon_mpdu *mon_mpdu;
161+
struct hal_sw_mon_ring_entries sw_mon_entries;
139162
struct ath11k_pdev_mon_stats rx_mon_stats;
140163
/* lock for monitor data */
141164
spinlock_t mon_lock;
@@ -245,6 +268,7 @@ struct ath11k_dp {
245268
struct hal_wbm_idle_scatter_list scatter_list[DP_IDLE_SCATTER_BUFS_MAX];
246269
struct list_head reo_cmd_list;
247270
struct list_head reo_cmd_cache_flush_list;
271+
struct list_head dp_full_mon_mpdu_list;
248272
u32 reo_cmd_cache_flush_count;
249273
/**
250274
* protects access to below fields,

0 commit comments

Comments
 (0)