qcacmn: Add missing fields in CDP Rx PPDU Statistics structure
Enable reaping of HAL PPDU Status ring when ol stats are enabled. Added peer mac address and first_data_seqcntl fields into CDP Rx PPDU_stats structure. Added support to disable printing of per packet stats through iwpriv command. Change-Id: If0f967676e867c7ba9870770c3c818cbea43461a
This commit is contained in:

committed by
Nandini Suresh

parent
04dfab5ac6
commit
d7eb83ec15
@@ -159,6 +159,18 @@ enum cdp_host_txrx_stats {
|
|||||||
TXRX_HOST_STATS_MAX,
|
TXRX_HOST_STATS_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* cdp_ppdu_ftype: PPDU Frame Type
|
||||||
|
* @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame
|
||||||
|
* @CDP_PPDU_FTYPE_CTRL: Control/Management Frames
|
||||||
|
*/
|
||||||
|
enum cdp_ppdu_ftype {
|
||||||
|
CDP_PPDU_FTYPE_DATA,
|
||||||
|
CDP_PPDU_FTYPE_CTRL,
|
||||||
|
CDP_PPDU_FTYPE_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief General specification of the tx frame contents
|
* @brief General specification of the tx frame contents
|
||||||
*
|
*
|
||||||
@@ -1168,6 +1180,9 @@ struct cdp_tx_completion_msdu {
|
|||||||
* @duration: PPDU duration
|
* @duration: PPDU duration
|
||||||
* @tid: TID number
|
* @tid: TID number
|
||||||
* @peer_id: Peer ID
|
* @peer_id: Peer ID
|
||||||
|
* @vdev_id: VAP ID
|
||||||
|
* @mac_addr: Peer MAC Address
|
||||||
|
* @first_data_seq_ctrl: Sequence control field of first data frame
|
||||||
* @ltf_size: ltf_size
|
* @ltf_size: ltf_size
|
||||||
* @stbc: When set, STBC rate was used
|
* @stbc: When set, STBC rate was used
|
||||||
* @he_re: he_re (range extension)
|
* @he_re: he_re (range extension)
|
||||||
@@ -1200,6 +1215,9 @@ struct cdp_rx_indication_ppdu {
|
|||||||
uint16_t duration;
|
uint16_t duration;
|
||||||
uint32_t tid:8,
|
uint32_t tid:8,
|
||||||
peer_id:16;
|
peer_id:16;
|
||||||
|
uint8_t vdev_id;
|
||||||
|
uint8_t mac_addr[6];
|
||||||
|
uint16_t first_data_seq_ctrl;
|
||||||
union {
|
union {
|
||||||
uint32_t rate_info;
|
uint32_t rate_info;
|
||||||
struct {
|
struct {
|
||||||
|
@@ -1320,6 +1320,7 @@ static uint8_t dp_get_ppdu_info_user_index(struct dp_pdev *pdev,
|
|||||||
static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
||||||
uint32_t *tag_buf)
|
uint32_t *tag_buf)
|
||||||
{
|
{
|
||||||
|
uint16_t frame_type;
|
||||||
struct cdp_tx_completion_ppdu *ppdu_desc;
|
struct cdp_tx_completion_ppdu *ppdu_desc;
|
||||||
htt_ppdu_stats_common_tlv *dp_stats_buf =
|
htt_ppdu_stats_common_tlv *dp_stats_buf =
|
||||||
(htt_ppdu_stats_common_tlv *)tag_buf;
|
(htt_ppdu_stats_common_tlv *)tag_buf;
|
||||||
@@ -1332,8 +1333,14 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
|||||||
ppdu_desc->num_users =
|
ppdu_desc->num_users =
|
||||||
HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_GET(*tag_buf);
|
HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_GET(*tag_buf);
|
||||||
tag_buf++;
|
tag_buf++;
|
||||||
ppdu_desc->frame_type =
|
frame_type = HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_GET(*tag_buf);
|
||||||
HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_GET(*tag_buf);
|
|
||||||
|
if ((frame_type == HTT_STATS_FTYPE_TIDQ_DATA_SU) ||
|
||||||
|
(frame_type == HTT_STATS_FTYPE_TIDQ_DATA_MU))
|
||||||
|
ppdu_desc->frame_type = CDP_PPDU_FTYPE_DATA;
|
||||||
|
else
|
||||||
|
ppdu_desc->frame_type = CDP_PPDU_FTYPE_CTRL;
|
||||||
|
|
||||||
ppdu_desc->ppdu_start_timestamp = dp_stats_buf->ppdu_start_tstmp_us;
|
ppdu_desc->ppdu_start_timestamp = dp_stats_buf->ppdu_start_tstmp_us;
|
||||||
ppdu_desc->ppdu_end_timestamp = 0; /*TODO: value to be provided by FW */
|
ppdu_desc->ppdu_end_timestamp = 0; /*TODO: value to be provided by FW */
|
||||||
tag_buf += 6;
|
tag_buf += 6;
|
||||||
|
@@ -66,7 +66,12 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qdf_mem_copy(cdp_rx_ppdu->mac_addr,
|
||||||
|
peer->mac_addr.raw, DP_MAC_ADDR_LEN);
|
||||||
|
cdp_rx_ppdu->first_data_seq_ctrl =
|
||||||
|
ppdu_info->rx_status.first_data_seq_ctrl;
|
||||||
cdp_rx_ppdu->peer_id = peer->peer_ids[0];
|
cdp_rx_ppdu->peer_id = peer->peer_ids[0];
|
||||||
|
cdp_rx_ppdu->vdev_id = peer->vdev->vdev_id;
|
||||||
cdp_rx_ppdu->ppdu_id = ppdu_info->com_info.ppdu_id;
|
cdp_rx_ppdu->ppdu_id = ppdu_info->com_info.ppdu_id;
|
||||||
cdp_rx_ppdu->duration = ppdu_info->rx_status.duration;
|
cdp_rx_ppdu->duration = ppdu_info->rx_status.duration;
|
||||||
cdp_rx_ppdu->u.bw = ppdu_info->rx_status.bw;
|
cdp_rx_ppdu->u.bw = ppdu_info->rx_status.bw;
|
||||||
@@ -76,7 +81,6 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc,
|
|||||||
cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
|
cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
|
||||||
cdp_rx_ppdu->timestamp = ppdu_info->com_info.ppdu_timestamp;
|
cdp_rx_ppdu->timestamp = ppdu_info->com_info.ppdu_timestamp;
|
||||||
cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_freq;
|
cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_freq;
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
@@ -165,7 +169,7 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id,
|
|||||||
status_nbuf, HTT_INVALID_PEER, WDI_NO_VAL, mac_id);
|
status_nbuf, HTT_INVALID_PEER, WDI_NO_VAL, mac_id);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (pdev->monitor_vdev != NULL) {
|
if ((pdev->monitor_vdev != NULL) || (pdev->enhanced_stats_en)) {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
tlv_status = hal_rx_status_get_tlv_info(rx_tlv,
|
tlv_status = hal_rx_status_get_tlv_info(rx_tlv,
|
||||||
|
Reference in New Issue
Block a user