qcacmn: Restructure Rx TLV recording
Restructured Rx TLV recording implementation. Shifted definitions to monitor 2.0 files. CRs-Fixed: 3410093 Change-Id: I083f3a37e5caff668976c9ca955926afe16a242d
This commit is contained in:

committed by
Madan Koyyalamudi

parent
bc5188b115
commit
a70effe5d4
@@ -1313,18 +1313,22 @@ static void dp_mon_register_intr_ops_2_0(struct dp_soc *soc)
|
|||||||
/*
|
/*
|
||||||
* dp_mon_pdev_tlv_logger_init() - initializes struct dp_mon_tlv_logger
|
* dp_mon_pdev_tlv_logger_init() - initializes struct dp_mon_tlv_logger
|
||||||
*
|
*
|
||||||
* @mon_pdev: pointer to dp_mon_pdev
|
* @pdev: pointer to dp_pdev
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_mon_pdev *mon_pdev)
|
QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
|
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||||
|
struct dp_mon_pdev_be *mon_pdev_be = NULL;
|
||||||
struct dp_mon_tlv_logger *tlv_log = NULL;
|
struct dp_mon_tlv_logger *tlv_log = NULL;
|
||||||
|
|
||||||
if (!mon_pdev)
|
if (!mon_pdev)
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
mon_pdev_be = dp_get_be_mon_pdev_from_dp_mon_pdev(mon_pdev);
|
||||||
|
|
||||||
tlv_log = qdf_mem_malloc(sizeof(struct dp_mon_tlv_logger));
|
tlv_log = qdf_mem_malloc(sizeof(struct dp_mon_tlv_logger));
|
||||||
if (!tlv_log) {
|
if (!tlv_log) {
|
||||||
qdf_err("Memory allocation failed");
|
qdf_err("Memory allocation failed");
|
||||||
@@ -1351,7 +1355,7 @@ QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_mon_pdev *mon_pdev)
|
|||||||
|
|
||||||
tlv_log->tlv_logging_enable = 1;
|
tlv_log->tlv_logging_enable = 1;
|
||||||
|
|
||||||
mon_pdev->rx_tlv_log = tlv_log;
|
mon_pdev_be->rx_tlv_log = tlv_log;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -1359,19 +1363,23 @@ QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_mon_pdev *mon_pdev)
|
|||||||
/*
|
/*
|
||||||
* dp_mon_pdev_tlv_logger_deinit() - deinitializes struct dp_mon_tlv_logger
|
* dp_mon_pdev_tlv_logger_deinit() - deinitializes struct dp_mon_tlv_logger
|
||||||
*
|
*
|
||||||
* @mon_pdev: pointer to dp_mon_pdev
|
* @pdev: pointer to dp_pdev
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
QDF_STATUS dp_mon_pdev_tlv_logger_deinit(struct dp_mon_pdev *mon_pdev)
|
QDF_STATUS dp_mon_pdev_tlv_logger_deinit(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
|
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||||
|
struct dp_mon_pdev_be *mon_pdev_be = NULL;
|
||||||
struct dp_mon_tlv_logger *tlv_log = NULL;
|
struct dp_mon_tlv_logger *tlv_log = NULL;
|
||||||
|
|
||||||
if (!mon_pdev)
|
if (!mon_pdev)
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
tlv_log = mon_pdev->rx_tlv_log;
|
mon_pdev_be = dp_get_be_mon_pdev_from_dp_mon_pdev(mon_pdev);
|
||||||
|
|
||||||
|
tlv_log = mon_pdev_be->rx_tlv_log;
|
||||||
if (!tlv_log || !(tlv_log->buff))
|
if (!tlv_log || !(tlv_log->buff))
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
@@ -1386,13 +1394,13 @@ QDF_STATUS dp_mon_pdev_tlv_logger_deinit(struct dp_mon_pdev *mon_pdev)
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_mon_pdev *mon_pdev)
|
QDF_STATUS dp_mon_pdev_tlv_logger_init(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS dp_mon_pdev_tlv_logger_deinit(struct dp_mon_pdev *mon_pdev)
|
QDF_STATUS dp_mon_pdev_tlv_logger_deinit(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@@ -47,6 +47,58 @@
|
|||||||
|
|
||||||
#define MAX_NUM_PPDU_RECORD 4
|
#define MAX_NUM_PPDU_RECORD 4
|
||||||
#define MAX_TLVS_PER_PPDU 255
|
#define MAX_TLVS_PER_PPDU 255
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct dp_mon_tlv_info - recorded information of each TLV
|
||||||
|
* @tlv_tag: tlv tag
|
||||||
|
* @data: union of struct of fields to be recorded for each TLV
|
||||||
|
*
|
||||||
|
* Tag and its corresponding important fields are stored in this struct
|
||||||
|
*/
|
||||||
|
struct dp_mon_tlv_info {
|
||||||
|
uint32_t tlv_tag:10;
|
||||||
|
union {
|
||||||
|
struct hal_ppdu_start_tlv_record ppdu_start;
|
||||||
|
struct hal_ppdu_start_user_info_tlv_record ppdu_start_user_info;
|
||||||
|
struct hal_mpdu_start_tlv_record mpdu_start;
|
||||||
|
struct hal_mpdu_end_tlv_record mpdu_end;
|
||||||
|
struct hal_header_tlv_record header;
|
||||||
|
struct hal_msdu_end_tlv_record msdu_end;
|
||||||
|
struct hal_mon_buffer_addr_tlv_record mon_buffer_addr;
|
||||||
|
struct hal_phy_location_tlv_record phy_location;
|
||||||
|
struct hal_ppdu_end_user_stats_tlv_record ppdu_end_user_stats;
|
||||||
|
struct hal_pcu_ppdu_end_info_tlv_record pcu_ppdu_end_info;
|
||||||
|
struct hal_phy_rx_ht_sig_tlv_record phy_rx_ht_sig;
|
||||||
|
uint32_t data:22;
|
||||||
|
} data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct dp_mon_tlv_logger - contains indexes and other data of the buffer
|
||||||
|
* @buff: buffer in which TLVs are stored
|
||||||
|
* @curr_ppdu_pos: position of the next ppdu to be written
|
||||||
|
* @ppdu_start_idx: starting index form which PPDU start level TLVs are stored for a ppdu
|
||||||
|
* @mpdu_idx: starting index form which MPDU TLVs are stored for a ppdu
|
||||||
|
* @ppdu_end_idx: starting index form which PPDU end level TLVs are stored for a ppdu
|
||||||
|
* @max_ppdu_start_idx: ending index for PPDU start level TLVs for a ppdu
|
||||||
|
* @max_mpdu_idx: ending index for MPDU level TLVs for a ppdu
|
||||||
|
* @max_ppdu_end_idx: ending index for PPDU end level TLVs for a ppdu
|
||||||
|
* @wrap_flag: flag toggle between consecutive PPDU
|
||||||
|
* @tlv_logging_enable: check is tlv logging is enabled
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct dp_mon_tlv_logger {
|
||||||
|
void *buff;
|
||||||
|
uint16_t curr_ppdu_pos;
|
||||||
|
uint16_t ppdu_start_idx;
|
||||||
|
uint16_t mpdu_idx;
|
||||||
|
uint16_t ppdu_end_idx;
|
||||||
|
uint16_t max_ppdu_start_idx;
|
||||||
|
uint16_t max_ppdu_end_idx;
|
||||||
|
uint16_t max_mpdu_idx;
|
||||||
|
uint8_t wrap_flag;
|
||||||
|
bool tlv_logging_enable;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* monitor frame filter modes */
|
/* monitor frame filter modes */
|
||||||
@@ -166,6 +218,7 @@ struct dp_mon_desc_pool {
|
|||||||
* @prev_rxmon_cookie: prev rxmon cookie
|
* @prev_rxmon_cookie: prev rxmon cookie
|
||||||
* @ppdu_info_cache: PPDU info cache
|
* @ppdu_info_cache: PPDU info cache
|
||||||
* @total_free_elem: total free element in queue
|
* @total_free_elem: total free element in queue
|
||||||
|
* @rx_tlv_logger: Rx TLV logger struct
|
||||||
*/
|
*/
|
||||||
struct dp_mon_pdev_be {
|
struct dp_mon_pdev_be {
|
||||||
struct dp_mon_pdev mon_pdev;
|
struct dp_mon_pdev mon_pdev;
|
||||||
@@ -192,6 +245,9 @@ struct dp_mon_pdev_be {
|
|||||||
uint32_t prev_rxmon_cookie;
|
uint32_t prev_rxmon_cookie;
|
||||||
qdf_kmem_cache_t ppdu_info_cache;
|
qdf_kmem_cache_t ppdu_info_cache;
|
||||||
uint32_t total_free_elem;
|
uint32_t total_free_elem;
|
||||||
|
#ifdef MONITOR_TLV_RECORDING_ENABLE
|
||||||
|
struct dp_mon_tlv_logger *rx_tlv_log;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -367,16 +367,16 @@ void dp_rx_mon_pf_tag_to_buf_headroom_2_0(void *nbuf,
|
|||||||
* dp_mon_record_index_update() - update the indexes of dp_mon_tlv_logger
|
* dp_mon_record_index_update() - update the indexes of dp_mon_tlv_logger
|
||||||
* to store next tlv
|
* to store next tlv
|
||||||
*
|
*
|
||||||
* @mon_pdev: pointer to dp_mon_pdev
|
* @mon_pdev_be: pointer to dp_mon_pdev_be
|
||||||
*
|
*
|
||||||
* Return
|
* Return
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dp_mon_record_index_update(struct dp_mon_pdev *mon_pdev) {
|
dp_mon_record_index_update(struct dp_mon_pdev_be *mon_pdev_be) {
|
||||||
struct dp_mon_tlv_logger *tlv_log = NULL;
|
struct dp_mon_tlv_logger *tlv_log = NULL;
|
||||||
struct dp_mon_tlv_info *tlv_info = NULL;
|
struct dp_mon_tlv_info *tlv_info = NULL;
|
||||||
|
|
||||||
tlv_log = mon_pdev->rx_tlv_log;
|
tlv_log = mon_pdev_be->rx_tlv_log;
|
||||||
tlv_info = (struct dp_mon_tlv_info *)tlv_log->buff;
|
tlv_info = (struct dp_mon_tlv_info *)tlv_log->buff;
|
||||||
|
|
||||||
(tlv_log->curr_ppdu_pos + 1 == MAX_NUM_PPDU_RECORD) ?
|
(tlv_log->curr_ppdu_pos + 1 == MAX_NUM_PPDU_RECORD) ?
|
||||||
@@ -400,13 +400,13 @@ dp_mon_record_index_update(struct dp_mon_pdev *mon_pdev) {
|
|||||||
/**
|
/**
|
||||||
* dp_mon_record_tlv() - Store the contents of the tlv in buffer
|
* dp_mon_record_tlv() - Store the contents of the tlv in buffer
|
||||||
*
|
*
|
||||||
* @mon_pdev: pointe to dp_mon_pdev
|
* @mon_pdev_be: pointe to dp_mon_pdev_be
|
||||||
* @ppdu_info: struct hal_rx_ppdu_info
|
* @ppdu_info: struct hal_rx_ppdu_info
|
||||||
*
|
*
|
||||||
* Return
|
* Return
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dp_mon_record_tlv(struct dp_mon_pdev *mon_pdev,
|
dp_mon_record_tlv(struct dp_mon_pdev_be *mon_pdev_be,
|
||||||
struct hal_rx_ppdu_info *ppdu_info) {
|
struct hal_rx_ppdu_info *ppdu_info) {
|
||||||
struct dp_mon_tlv_logger *tlv_log = NULL;
|
struct dp_mon_tlv_logger *tlv_log = NULL;
|
||||||
struct dp_mon_tlv_info *tlv_info = NULL;
|
struct dp_mon_tlv_info *tlv_info = NULL;
|
||||||
@@ -415,10 +415,10 @@ dp_mon_record_tlv(struct dp_mon_pdev *mon_pdev,
|
|||||||
uint16_t *mpdu_idx = NULL;
|
uint16_t *mpdu_idx = NULL;
|
||||||
uint16_t *ppdu_end_idx = NULL;
|
uint16_t *ppdu_end_idx = NULL;
|
||||||
|
|
||||||
if (!mon_pdev || !(mon_pdev->rx_tlv_log))
|
if (!mon_pdev_be || !(mon_pdev_be->rx_tlv_log))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tlv_log = mon_pdev->rx_tlv_log;
|
tlv_log = mon_pdev_be->rx_tlv_log;
|
||||||
if (!tlv_log->tlv_logging_enable || !(tlv_log->buff))
|
if (!tlv_log->tlv_logging_enable || !(tlv_log->buff))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -546,16 +546,16 @@ dp_mon_record_tlv(struct dp_mon_pdev *mon_pdev,
|
|||||||
/**
|
/**
|
||||||
* dp_mon_record_clear_buffer() - Clear the buffer to record next PPDU
|
* dp_mon_record_clear_buffer() - Clear the buffer to record next PPDU
|
||||||
*
|
*
|
||||||
* @mon_pdev: pointer to dp_mon_pdev
|
* @mon_pdev_be: pointer to dp_mon_pdev_be
|
||||||
*
|
*
|
||||||
* Return
|
* Return
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dp_mon_record_clear_buffer(struct dp_mon_pdev *mon_pdev) {
|
dp_mon_record_clear_buffer(struct dp_mon_pdev_be *mon_pdev_be) {
|
||||||
struct dp_mon_tlv_logger *rx_tlv_log = NULL;
|
struct dp_mon_tlv_logger *rx_tlv_log = NULL;
|
||||||
struct dp_mon_tlv_info *tlv_info = NULL;
|
struct dp_mon_tlv_info *tlv_info = NULL;
|
||||||
|
|
||||||
rx_tlv_log = mon_pdev->rx_tlv_log;
|
rx_tlv_log = mon_pdev_be->rx_tlv_log;
|
||||||
tlv_info = (struct dp_mon_tlv_info *)rx_tlv_log->buff;
|
tlv_info = (struct dp_mon_tlv_info *)rx_tlv_log->buff;
|
||||||
qdf_mem_zero(&tlv_info[rx_tlv_log->ppdu_start_idx],
|
qdf_mem_zero(&tlv_info[rx_tlv_log->ppdu_start_idx],
|
||||||
MAX_TLVS_PER_PPDU * sizeof(struct dp_mon_tlv_info));
|
MAX_TLVS_PER_PPDU * sizeof(struct dp_mon_tlv_info));
|
||||||
@@ -564,16 +564,16 @@ dp_mon_record_clear_buffer(struct dp_mon_pdev *mon_pdev) {
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
void
|
void
|
||||||
dp_mon_record_index_update(struct dp_mon_pdev *mon_pdev) {
|
dp_mon_record_index_update(struct dp_mon_pdev_be *mon_pdev_be) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dp_mon_record_tlv(struct dp_mon_pdev *mon_pdev,
|
dp_mon_record_tlv(struct dp_mon_pdev_be *mon_pdev_be,
|
||||||
struct hal_rx_ppdu_info *ppdu_info) {
|
struct hal_rx_ppdu_info *ppdu_info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dp_mon_record_clear_buffer(struct dp_mon_pdev *mon_pdev) {
|
dp_mon_record_clear_buffer(struct dp_mon_pdev_be *mon_pdev_be) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1779,14 +1779,14 @@ dp_rx_mon_process_status_tlv(struct dp_pdev *pdev)
|
|||||||
rx_tlv = buf;
|
rx_tlv = buf;
|
||||||
rx_tlv_start = buf;
|
rx_tlv_start = buf;
|
||||||
|
|
||||||
dp_mon_record_clear_buffer(mon_pdev);
|
dp_mon_record_clear_buffer(mon_pdev_be);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
tlv_status = hal_rx_status_get_tlv_info(rx_tlv,
|
tlv_status = hal_rx_status_get_tlv_info(rx_tlv,
|
||||||
ppdu_info,
|
ppdu_info,
|
||||||
pdev->soc->hal_soc,
|
pdev->soc->hal_soc,
|
||||||
buf);
|
buf);
|
||||||
dp_mon_record_tlv(mon_pdev, ppdu_info);
|
dp_mon_record_tlv(mon_pdev_be, ppdu_info);
|
||||||
work_done += dp_rx_mon_process_tlv_status(pdev,
|
work_done += dp_rx_mon_process_tlv_status(pdev,
|
||||||
ppdu_info,
|
ppdu_info,
|
||||||
buf,
|
buf,
|
||||||
@@ -1816,7 +1816,7 @@ dp_rx_mon_process_status_tlv(struct dp_pdev *pdev)
|
|||||||
qdf_frag_free(buf);
|
qdf_frag_free(buf);
|
||||||
DP_STATS_INC(mon_soc, frag_free, 1);
|
DP_STATS_INC(mon_soc, frag_free, 1);
|
||||||
mon_pdev->rx_mon_stats.status_buf_count++;
|
mon_pdev->rx_mon_stats.status_buf_count++;
|
||||||
dp_mon_record_index_update(mon_pdev);
|
dp_mon_record_index_update(mon_pdev_be);
|
||||||
}
|
}
|
||||||
|
|
||||||
dp_mon_rx_stats_update_rssi_dbm_params(mon_pdev, ppdu_info);
|
dp_mon_rx_stats_update_rssi_dbm_params(mon_pdev, ppdu_info);
|
||||||
|
@@ -5887,7 +5887,7 @@ QDF_STATUS dp_mon_pdev_init(struct dp_pdev *pdev)
|
|||||||
mon_ops->mon_pdev_ext_init(pdev);
|
mon_ops->mon_pdev_ext_init(pdev);
|
||||||
|
|
||||||
if (mon_ops->mon_rx_pdev_tlv_logger_init)
|
if (mon_ops->mon_rx_pdev_tlv_logger_init)
|
||||||
mon_ops->mon_rx_pdev_tlv_logger_init(pdev->monitor_pdev);
|
mon_ops->mon_rx_pdev_tlv_logger_init(pdev);
|
||||||
|
|
||||||
mon_pdev->is_dp_mon_pdev_initialized = true;
|
mon_pdev->is_dp_mon_pdev_initialized = true;
|
||||||
|
|
||||||
@@ -5937,8 +5937,7 @@ QDF_STATUS dp_mon_pdev_deinit(struct dp_pdev *pdev)
|
|||||||
mon_ops->mon_pdev_ext_deinit(pdev);
|
mon_ops->mon_pdev_ext_deinit(pdev);
|
||||||
|
|
||||||
if (mon_ops->mon_rx_pdev_tlv_logger_deinit)
|
if (mon_ops->mon_rx_pdev_tlv_logger_deinit)
|
||||||
mon_ops->mon_rx_pdev_tlv_logger_deinit(
|
mon_ops->mon_rx_pdev_tlv_logger_deinit(pdev);
|
||||||
pdev->monitor_pdev);
|
|
||||||
|
|
||||||
/* detach monitor function */
|
/* detach monitor function */
|
||||||
dp_monitor_tx_ppdu_stats_detach(pdev);
|
dp_monitor_tx_ppdu_stats_detach(pdev);
|
||||||
|
@@ -100,132 +100,6 @@ static inline bool dp_is_monitor_mode_using_poll(struct dp_soc *soc)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MONITOR_TLV_RECORDING_ENABLE
|
|
||||||
/*
|
|
||||||
* struct dp_mon_tlv_info - recorded information of each TLV
|
|
||||||
* @tlv_tag: tlv tag
|
|
||||||
* @data: other fields recorded for a TLV
|
|
||||||
*
|
|
||||||
* Tag and its corresponding important fields are stored in this struct
|
|
||||||
*/
|
|
||||||
struct ppdu_start_tlv_record {
|
|
||||||
uint32_t ppdu_id:10;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ppdu_start_user_info_tlv_record {
|
|
||||||
uint32_t user_id:6,
|
|
||||||
rate_mcs:4,
|
|
||||||
nss:3,
|
|
||||||
reception_type:3,
|
|
||||||
sgi:2;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mpdu_start_tlv_record {
|
|
||||||
uint32_t user_id:6,
|
|
||||||
wrap_flag:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mpdu_end_tlv_record {
|
|
||||||
uint32_t user_id:6,
|
|
||||||
fcs_err:1,
|
|
||||||
wrap_flag:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct header_tlv_record {
|
|
||||||
uint32_t wrap_flag:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct msdu_end_tlv_record {
|
|
||||||
uint32_t user_id:6,
|
|
||||||
msdu_num:8,
|
|
||||||
tid:4,
|
|
||||||
tcp_proto:1,
|
|
||||||
udp_proto:1,
|
|
||||||
wrap_flag:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mon_buffer_addr_tlv_record {
|
|
||||||
uint32_t dma_length:12,
|
|
||||||
truncation:1,
|
|
||||||
continuation:1,
|
|
||||||
wrap_flag:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct phy_location_tlv_record {
|
|
||||||
uint32_t rtt_cfr_status:8,
|
|
||||||
rtt_num_streams:8,
|
|
||||||
rx_location_info_valid:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ppdu_end_user_stats_tlv_record {
|
|
||||||
uint32_t ast_index:16,
|
|
||||||
pkt_type:4;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct pcu_ppdu_end_info_tlv_record {
|
|
||||||
uint32_t dialog_topken:8,
|
|
||||||
bb_captured_reason:3,
|
|
||||||
bb_captured_channel:1,
|
|
||||||
bb_captured_timeout:1,
|
|
||||||
mpdu_delimiter_error_seen:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct phy_rx_ht_sig_tlv_record {
|
|
||||||
uint32_t crc:8,
|
|
||||||
mcs:7,
|
|
||||||
stbc:2,
|
|
||||||
aggregation:1,
|
|
||||||
short_gi:1,
|
|
||||||
fes_coding:1,
|
|
||||||
cbw:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dp_mon_tlv_info {
|
|
||||||
uint32_t tlv_tag:10;
|
|
||||||
union {
|
|
||||||
struct ppdu_start_tlv_record ppdu_start;
|
|
||||||
struct ppdu_start_user_info_tlv_record ppdu_start_user_info;
|
|
||||||
struct mpdu_start_tlv_record mpdu_start;
|
|
||||||
struct mpdu_end_tlv_record mpdu_end;
|
|
||||||
struct header_tlv_record header;
|
|
||||||
struct msdu_end_tlv_record msdu_end;
|
|
||||||
struct mon_buffer_addr_tlv_record mon_buffer_addr;
|
|
||||||
struct phy_location_tlv_record phy_location;
|
|
||||||
struct ppdu_end_user_stats_tlv_record ppdu_end_user_stats;
|
|
||||||
struct pcu_ppdu_end_info_tlv_record pcu_ppdu_end_info;
|
|
||||||
struct phy_rx_ht_sig_tlv_record phy_rx_ht_sig;
|
|
||||||
uint32_t data;
|
|
||||||
} data;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* struct dp_mon_tlv_logger - contains indexes and other data of the buffer
|
|
||||||
* @buff: buffer in which TLVs are stored
|
|
||||||
* @curr_ppdu_pos: position of the next ppdu to be written
|
|
||||||
* @ppdu_start_idx: starting index form which PPDU start level TLVs are stored for a ppdu
|
|
||||||
* @mpdu_idx: starting index form which MPDU TLVs are stored for a ppdu
|
|
||||||
* @ppdu_end_idx: starting index form which PPDU end level TLVs are stored for a ppdu
|
|
||||||
* @max_ppdu_start_idx: ending index for PPDU start level TLVs for a ppdu
|
|
||||||
* @max_mpdu_idx: ending index for MPDU level TLVs for a ppdu
|
|
||||||
* @max_ppdu_end_idx: ending index for PPDU end level TLVs for a ppdu
|
|
||||||
* @wrap_flag: flag toggle between consecutive PPDU
|
|
||||||
* @tlv_logging_enable: check is tlv logging is enabled
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
struct dp_mon_tlv_logger {
|
|
||||||
void *buff;
|
|
||||||
uint16_t curr_ppdu_pos;
|
|
||||||
uint16_t ppdu_start_idx;
|
|
||||||
uint16_t mpdu_idx;
|
|
||||||
uint16_t ppdu_end_idx;
|
|
||||||
uint16_t max_ppdu_start_idx;
|
|
||||||
uint16_t max_ppdu_end_idx;
|
|
||||||
uint16_t max_mpdu_idx;
|
|
||||||
uint8_t wrap_flag;
|
|
||||||
bool tlv_logging_enable;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_mon_soc_attach() - DP monitor soc attach
|
* dp_mon_soc_attach() - DP monitor soc attach
|
||||||
* @soc: Datapath SOC handle
|
* @soc: Datapath SOC handle
|
||||||
@@ -950,8 +824,8 @@ struct dp_mon_ops {
|
|||||||
#endif
|
#endif
|
||||||
QDF_STATUS (*mon_pdev_ext_init)(struct dp_pdev *pdev);
|
QDF_STATUS (*mon_pdev_ext_init)(struct dp_pdev *pdev);
|
||||||
QDF_STATUS (*mon_pdev_ext_deinit)(struct dp_pdev *pdev);
|
QDF_STATUS (*mon_pdev_ext_deinit)(struct dp_pdev *pdev);
|
||||||
QDF_STATUS (*mon_rx_pdev_tlv_logger_init)(struct dp_mon_pdev *mon_pdev);
|
QDF_STATUS (*mon_rx_pdev_tlv_logger_init)(struct dp_pdev *pdev);
|
||||||
QDF_STATUS (*mon_rx_pdev_tlv_logger_deinit)(struct dp_mon_pdev *mon_pdev);
|
QDF_STATUS (*mon_rx_pdev_tlv_logger_deinit)(struct dp_pdev *pdev);
|
||||||
QDF_STATUS (*mon_lite_mon_alloc)(struct dp_pdev *pdev);
|
QDF_STATUS (*mon_lite_mon_alloc)(struct dp_pdev *pdev);
|
||||||
void (*mon_lite_mon_dealloc)(struct dp_pdev *pdev);
|
void (*mon_lite_mon_dealloc)(struct dp_pdev *pdev);
|
||||||
void (*mon_lite_mon_vdev_delete)(struct dp_pdev *pdev,
|
void (*mon_lite_mon_vdev_delete)(struct dp_pdev *pdev,
|
||||||
@@ -1129,11 +1003,6 @@ struct dp_mon_pdev {
|
|||||||
uint16_t mo_data_filter;
|
uint16_t mo_data_filter;
|
||||||
uint16_t md_data_filter;
|
uint16_t md_data_filter;
|
||||||
|
|
||||||
#ifdef MONITOR_TLV_RECORDING_ENABLE
|
|
||||||
/*Rx TLV logger*/
|
|
||||||
struct dp_mon_tlv_logger *rx_tlv_log;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
#ifdef WLAN_TX_PKT_CAPTURE_ENH
|
||||||
struct dp_pdev_tx_capture tx_capture;
|
struct dp_pdev_tx_capture tx_capture;
|
||||||
bool stop_tx_capture_work_q_timer;
|
bool stop_tx_capture_work_q_timer;
|
||||||
|
@@ -1075,14 +1075,91 @@ enum txmon_generated_response {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MONITOR_TLV_RECORDING_ENABLE
|
#ifdef MONITOR_TLV_RECORDING_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enum ppdu_tlv_category - Categories of TLV
|
* Please make sure that the maximum total size of fields in each TLV
|
||||||
|
* is 22 bits.
|
||||||
|
* 10 bits are reserved for tlv_tag
|
||||||
|
*/
|
||||||
|
struct hal_ppdu_start_tlv_record {
|
||||||
|
uint32_t ppdu_id:10;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_ppdu_start_user_info_tlv_record {
|
||||||
|
uint32_t user_id:6,
|
||||||
|
rate_mcs:4,
|
||||||
|
nss:3,
|
||||||
|
reception_type:3,
|
||||||
|
sgi:2;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_mpdu_start_tlv_record {
|
||||||
|
uint32_t user_id:6,
|
||||||
|
wrap_flag:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_mpdu_end_tlv_record {
|
||||||
|
uint32_t user_id:6,
|
||||||
|
fcs_err:1,
|
||||||
|
wrap_flag:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_header_tlv_record {
|
||||||
|
uint32_t wrap_flag:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_msdu_end_tlv_record {
|
||||||
|
uint32_t user_id:6,
|
||||||
|
msdu_num:8,
|
||||||
|
tid:4,
|
||||||
|
tcp_proto:1,
|
||||||
|
udp_proto:1,
|
||||||
|
wrap_flag:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_mon_buffer_addr_tlv_record {
|
||||||
|
uint32_t dma_length:12,
|
||||||
|
truncation:1,
|
||||||
|
continuation:1,
|
||||||
|
wrap_flag:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_phy_location_tlv_record {
|
||||||
|
uint32_t rtt_cfr_status:8,
|
||||||
|
rtt_num_streams:8,
|
||||||
|
rx_location_info_valid:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_ppdu_end_user_stats_tlv_record {
|
||||||
|
uint32_t ast_index:16,
|
||||||
|
pkt_type:4;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_pcu_ppdu_end_info_tlv_record {
|
||||||
|
uint32_t dialog_topken:8,
|
||||||
|
bb_captured_reason:3,
|
||||||
|
bb_captured_channel:1,
|
||||||
|
bb_captured_timeout:1,
|
||||||
|
mpdu_delimiter_error_seen:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hal_phy_rx_ht_sig_tlv_record {
|
||||||
|
uint32_t crc:8,
|
||||||
|
mcs:7,
|
||||||
|
stbc:2,
|
||||||
|
aggregation:1,
|
||||||
|
short_gi:1,
|
||||||
|
fes_coding:1,
|
||||||
|
cbw:1;
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
* enum hal_ppdu_tlv_category - Categories of TLV
|
||||||
* @PPDU_START: PPDU start level TLV
|
* @PPDU_START: PPDU start level TLV
|
||||||
* @MPDU: MPDU level TLV
|
* @MPDU: MPDU level TLV
|
||||||
* @PPDU_END: PPDU end level TLV
|
* @PPDU_END: PPDU end level TLV
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
enum ppdu_tlv_category {
|
enum hal_ppdu_tlv_category {
|
||||||
CATEGORY_PPDU_START = 1,
|
CATEGORY_PPDU_START = 1,
|
||||||
CATEGORY_MPDU,
|
CATEGORY_MPDU,
|
||||||
CATEGORY_PPDU_END
|
CATEGORY_PPDU_END
|
||||||
|
Reference in New Issue
Block a user