qcacmn: Add extension2 data to radiotap header

There is a requirement to get sequence number and tid for tx
data packets in packet capture mode. These fields are not
received as part of WBM tx completion, but are obtained from
FW in ppdu stats. As WBM tx completion and FW ppdu stats are
two different events, the ppdu_stats of previously sent ppdu
are filled in the radiotap header of current tx ppdu in packet
capture mode.

Enhance code to add required fields such as ppdu_id of tx current
ppdu and ppdu_id, tid, start_seq, ba_bitmap of previously sent ppdu
as extension2 to radiotap header. These fields will be added in
radiotap header only when add_rtap_ext2 is set.

Change-Id: I448a9c03a770b61ab802d855bc5f1a6587bd01b3
CRs-Fixed: 3004472
这个提交包含在:
Surabhi Vishnoi
2021-05-19 18:32:02 +05:30
提交者 Madan Koyyalamudi
父节点 8fbbf2af16
当前提交 878eeb8f5d
修改 2 个文件,包含 47 行新增2 行删除

查看文件

@@ -199,6 +199,8 @@
* 4 bytes padding for alignment
*/
#define RADIOTAP_HEADER_EXT_LEN (2 * sizeof(uint32_t))
#define RADIOTAP_HEADER_EXT2_LEN \
(sizeof(struct qdf_radiotap_ext2))
#define RADIOTAP_HEADER_LEN (RADIOTAP_BASE_HEADER_LEN + \
RADIOTAP_FIXED_HEADER_LEN + \
RADIOTAP_HT_FLAGS_LEN + \
@@ -208,7 +210,8 @@
RADIOTAP_HE_MU_FLAGS_LEN + \
RADIOTAP_HE_MU_OTHER_FLAGS_LEN + \
RADIOTAP_VENDOR_NS_LEN + \
RADIOTAP_HEADER_EXT_LEN)
RADIOTAP_HEADER_EXT_LEN + \
RADIOTAP_HEADER_EXT2_LEN)
/**
* struct mon_rx_status - This will have monitor mode rx_status extracted from
@@ -286,6 +289,9 @@
* @tx_status: packet tx status
* @tx_retry_cnt: tx retry count
* @add_rtap_ext: add radio tap extension
* @start_seq: starting sequence number
* @ba_bitmap: 256 bit block ack bitmap
* @add_rtap_ext2: add radiotap extension2
*/
struct mon_rx_status {
uint64_t tsft;
@@ -370,6 +376,9 @@ struct mon_rx_status {
uint8_t tx_status;
uint8_t tx_retry_cnt;
bool add_rtap_ext;
uint16_t start_seq;
uint32_t ba_bitmap[8];
bool add_rtap_ext2;
};
/**
@@ -468,6 +477,23 @@ struct qdf_radiotap_vendor_ns_ath {
uint32_t ppdu_start_timestamp;
} __attribute__((__packed__));
/**
* struct qdf_radiotap_ext2 - radiotap ext2 fields
* ppdu_id: ppdu_id of current msdu
* prev_ppdu_id: ppdu_id of previous msdu
* tid: tid number of previous msdu
* start_seq: start sequence of previous msdu
* ba_bitmap: block ack bitmap of previous msdu
*/
struct qdf_radiotap_ext2 {
uint32_t ppdu_id;
uint32_t prev_ppdu_id;
uint16_t tid:8,
reserved:8;
uint16_t start_seq;
uint32_t ba_bitmap[8];
} __attribute__((__packed__));
#define QDF_MEM_FUNC_NAME_SIZE 48
/* Masks for HE SIG known fields in mon_rx_status structure */