qcacmn: add per user RX stats in Rx PPDU struct
1)Add per user RX stats in Rx PPDU struct 2)Add per RU size counters in wifistats/iwpriv txrx_stats 10 3)Modified RX ppdu indication structure. CRs-fixed: 2458732 Change-Id: Id8f3d6cce97503c0529642c4f5d66f3bbc59785d
This commit is contained in:
@@ -1525,6 +1525,70 @@ struct cdp_tx_completion_msdu {
|
||||
struct cdp_rate_stats extd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cdp_rx_stats_ppdu_user -- per user RX stats
|
||||
* @peer_id: Peer ID
|
||||
* @vdev_id: VAP ID
|
||||
* @is_ampdu: mpdu aggregate or non-aggregate?
|
||||
* @ofdma_info_valid: RU info valid
|
||||
* @ofdma_ru_start_index: RU index number(0-73)
|
||||
* @ofdma_ru_width: size of RU in units of 1(26tone)RU
|
||||
* @nss: NSS 1,2, ...8
|
||||
* @mcs: MCS index
|
||||
* @user_index: user ID in multi-user case
|
||||
* @ast_index: ast index in multi-user case
|
||||
* @tid: TID number
|
||||
* @num_msdu: Number of MSDUs in PPDU
|
||||
* @udp_msdu_count: Number of UDP MSDUs in PPDU
|
||||
* @tcp_msdu_count: Number of TCP MSDUs in PPDU
|
||||
* @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU
|
||||
* @frame_control: frame control field
|
||||
* @frame_control_info_valid: frame_control valid
|
||||
* @data_sequence_control_info_valid: data_sequence_control_info valid
|
||||
* @first_data_seq_ctrl: Sequence control field of first data frame
|
||||
* @preamble: preamble
|
||||
* @ht_flag: ht flag
|
||||
* @vht_flag: vht flag
|
||||
* @he_re: he_re (range extension)
|
||||
* @mpdu_cnt_fcs_ok: Number of MPDUs in PPDU with fcs ok
|
||||
* @mpdu_cnt_fcs_err: Number of MPDUs in PPDU with fcs err
|
||||
* @mpdu_fcs_ok_bitmap - MPDU with fcs ok bitmap
|
||||
* @retried - number of retries
|
||||
* @mac_addr: Peer MAC Address
|
||||
*/
|
||||
struct cdp_rx_stats_ppdu_user {
|
||||
uint16_t peer_id;
|
||||
uint8_t vdev_id;
|
||||
bool is_ampdu;
|
||||
uint32_t ofdma_info_valid:1,
|
||||
ofdma_ru_start_index:7,
|
||||
ofdma_ru_width:7,
|
||||
nss:4,
|
||||
mcs:4;
|
||||
/* user id */
|
||||
uint8_t user_index;
|
||||
uint32_t ast_index;
|
||||
uint32_t tid;
|
||||
uint16_t tcp_msdu_count;
|
||||
uint16_t udp_msdu_count;
|
||||
uint16_t other_msdu_count;
|
||||
uint16_t frame_control;
|
||||
uint8_t frame_control_info_valid;
|
||||
uint8_t data_sequence_control_info_valid;
|
||||
uint16_t first_data_seq_ctrl;
|
||||
uint32_t preamble_type;
|
||||
uint16_t ht_flags;
|
||||
uint16_t vht_flags;
|
||||
uint16_t he_flags;
|
||||
uint32_t mpdu_cnt_fcs_ok;
|
||||
uint32_t mpdu_cnt_fcs_err;
|
||||
uint64_t mpdu_fcs_ok_bitmap;
|
||||
uint32_t mpdu_ok_byte_count;
|
||||
uint32_t mpdu_err_byte_count;
|
||||
uint32_t retries;
|
||||
uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cdp_rx_indication_ppdu - Rx PPDU indication structure
|
||||
* @ppdu_id: PPDU Id
|
||||
@@ -1569,6 +1633,9 @@ struct cdp_tx_completion_msdu {
|
||||
* @rix: rate index
|
||||
* @rssi_chain: rssi chain per nss per bw
|
||||
* @cookie: cookie to used by upper layer
|
||||
* @user: per user stats in MU-user case
|
||||
* @nf: noise floor
|
||||
* @per_chain_rssi: rssi per antenna
|
||||
*/
|
||||
struct cdp_rx_indication_ppdu {
|
||||
uint32_t ppdu_id;
|
||||
@@ -1622,6 +1689,11 @@ struct cdp_rx_indication_ppdu {
|
||||
struct cdp_stats_cookie *cookie;
|
||||
struct cdp_rx_su_evm_info evm_info;
|
||||
uint32_t rx_antenna;
|
||||
uint8_t num_users;
|
||||
struct cdp_rx_stats_ppdu_user user[CDP_MU_MAX_USERS];
|
||||
uint32_t nf;
|
||||
uint8_t per_chain_rssi[MAX_CHAIN];
|
||||
uint8_t is_mcast_bcast;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1267,6 +1267,9 @@ struct cdp_htt_rx_pdev_stats {
|
||||
#define RX_PROTOCOL_TAG_ALL 0xff
|
||||
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
|
||||
|
||||
#define OFDMA_NUM_RU_SIZE 7
|
||||
|
||||
#define OFDMA_NUM_USERS 37
|
||||
/* struct cdp_pdev_stats - pdev stats
|
||||
* @msdu_not_done: packets dropped because msdu done bit not set
|
||||
* @mec:Multicast Echo check
|
||||
@@ -1298,6 +1301,10 @@ struct cdp_htt_rx_pdev_stats {
|
||||
* @cdp_delayed_ba_not_recev: counter for delayed ba not received
|
||||
* @htt_tx_pdev_stats: htt pdev stats for tx
|
||||
* @htt_rx_pdev_stats: htt pdev stats for rx
|
||||
* @data_rx_ru_size: UL ofdma data ru size counter array
|
||||
* @nondata_rx_ru_size: UL ofdma non data ru size counter array
|
||||
* @data_rx_ppdu: data rx ppdu counter
|
||||
* @data_user: data user counter array
|
||||
*/
|
||||
struct cdp_pdev_stats {
|
||||
struct {
|
||||
@@ -1349,6 +1356,14 @@ struct cdp_pdev_stats {
|
||||
/* Received wdi messages from fw */
|
||||
uint32_t wdi_event[CDP_WDI_NUM_EVENTS];
|
||||
struct cdp_tid_stats tid_stats;
|
||||
|
||||
/* numbers of data/nondata per RU sizes */
|
||||
struct {
|
||||
uint32_t data_rx_ru_size[OFDMA_NUM_RU_SIZE];
|
||||
uint32_t nondata_rx_ru_size[OFDMA_NUM_RU_SIZE];
|
||||
uint32_t data_rx_ppdu;
|
||||
uint32_t data_users[OFDMA_NUM_USERS];
|
||||
} ul_ofdma;
|
||||
};
|
||||
|
||||
#ifdef QCA_ENH_V3_STATS_SUPPORT
|
||||
|
@@ -1827,9 +1827,13 @@ static inline void dp_process_htt_stat_msg(struct htt_stats_context *htt_stats,
|
||||
}
|
||||
|
||||
if (copy_stats)
|
||||
dp_htt_stats_copy_tag(pdev, tlv_type, tlv_start);
|
||||
dp_htt_stats_copy_tag(pdev,
|
||||
tlv_type,
|
||||
tlv_start);
|
||||
else
|
||||
dp_htt_stats_print_tag(tlv_type, tlv_start);
|
||||
dp_htt_stats_print_tag(pdev,
|
||||
tlv_type,
|
||||
tlv_start);
|
||||
|
||||
if (tlv_type == HTT_STATS_PEER_DETAILS_TAG ||
|
||||
tlv_type == HTT_STATS_PEER_STATS_CMN_TAG)
|
||||
|
@@ -878,7 +878,8 @@ QDF_STATUS dp_h2t_ext_stats_msg_send(struct dp_pdev *pdev,
|
||||
uint32_t config_param_1, uint32_t config_param_2,
|
||||
uint32_t config_param_3, int cookie, int cookie_msb,
|
||||
uint8_t mac_id);
|
||||
void dp_htt_stats_print_tag(uint8_t tag_type, uint32_t *tag_buf);
|
||||
void dp_htt_stats_print_tag(struct dp_pdev *pdev,
|
||||
uint8_t tag_type, uint32_t *tag_buf);
|
||||
void dp_htt_stats_copy_tag(struct dp_pdev *pdev, uint8_t tag_type, uint32_t *tag_buf);
|
||||
void dp_peer_rxtid_stats(struct dp_peer *peer, void (*callback_fn),
|
||||
void *cb_ctxt);
|
||||
|
@@ -28,6 +28,8 @@
|
||||
#include "dp_internal.h"
|
||||
#include "qdf_mem.h" /* qdf_mem_malloc,free */
|
||||
|
||||
#include "htt.h"
|
||||
|
||||
#ifdef FEATURE_PERPKT_INFO
|
||||
#include "dp_ratetable.h"
|
||||
#endif
|
||||
@@ -100,6 +102,170 @@ dp_rx_populate_su_evm_details(struct hal_rx_ppdu_info *ppdu_info,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_inc_rusize_cnt() - increment pdev stats based on RU size
|
||||
* @pdev: pdev ctx
|
||||
* @rx_user_status: mon rx user status
|
||||
*
|
||||
* Return: bool
|
||||
*/
|
||||
static inline bool
|
||||
dp_rx_inc_rusize_cnt(struct dp_pdev *pdev,
|
||||
struct mon_rx_user_status *rx_user_status)
|
||||
{
|
||||
uint32_t ru_size;
|
||||
bool is_data;
|
||||
|
||||
ru_size = rx_user_status->dl_ofdma_ru_size;
|
||||
|
||||
if (dp_is_subtype_data(rx_user_status->frame_control)) {
|
||||
DP_STATS_INC(pdev,
|
||||
ul_ofdma.data_rx_ru_size[ru_size], 1);
|
||||
is_data = true;
|
||||
} else {
|
||||
DP_STATS_INC(pdev,
|
||||
ul_ofdma.nondata_rx_ru_size[ru_size], 1);
|
||||
is_data = false;
|
||||
}
|
||||
|
||||
return is_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_populate_cdp_indication_ppdu_user() - Populate per user cdp indication
|
||||
* @pdev: pdev ctx
|
||||
* @ppdu_info: ppdu info structure from ppdu ring
|
||||
* @ppdu_nbuf: qdf nbuf abstraction for linux skb
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static inline void
|
||||
dp_rx_populate_cdp_indication_ppdu_user(struct dp_pdev *pdev,
|
||||
struct hal_rx_ppdu_info *ppdu_info,
|
||||
qdf_nbuf_t ppdu_nbuf)
|
||||
{
|
||||
struct dp_peer *peer;
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
struct dp_ast_entry *ast_entry;
|
||||
struct cdp_rx_indication_ppdu *cdp_rx_ppdu;
|
||||
uint32_t ast_index;
|
||||
int i;
|
||||
struct mon_rx_user_status *rx_user_status;
|
||||
struct cdp_rx_stats_ppdu_user *rx_stats_peruser;
|
||||
int ru_size;
|
||||
bool is_data = false;
|
||||
uint32_t num_users;
|
||||
|
||||
cdp_rx_ppdu = (struct cdp_rx_indication_ppdu *)ppdu_nbuf->data;
|
||||
|
||||
num_users = ppdu_info->com_info.num_users;
|
||||
for (i = 0; i < num_users; i++) {
|
||||
if (i > OFDMA_NUM_USERS)
|
||||
return;
|
||||
|
||||
rx_user_status = &ppdu_info->rx_user_status[i];
|
||||
rx_stats_peruser = &cdp_rx_ppdu->user[i];
|
||||
|
||||
ast_index = rx_user_status->ast_index;
|
||||
if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
||||
rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
||||
return;
|
||||
}
|
||||
|
||||
ast_entry = soc->ast_table[ast_index];
|
||||
if (!ast_entry) {
|
||||
rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
||||
return;
|
||||
}
|
||||
|
||||
peer = ast_entry->peer;
|
||||
if (!peer || peer->peer_ids[0] == HTT_INVALID_PEER) {
|
||||
rx_stats_peruser->peer_id = HTT_INVALID_PEER;
|
||||
return;
|
||||
}
|
||||
|
||||
rx_stats_peruser->first_data_seq_ctrl =
|
||||
rx_user_status->first_data_seq_ctrl;
|
||||
|
||||
rx_stats_peruser->frame_control =
|
||||
rx_user_status->frame_control;
|
||||
|
||||
rx_stats_peruser->tcp_msdu_count =
|
||||
rx_user_status->tcp_msdu_count;
|
||||
rx_stats_peruser->udp_msdu_count =
|
||||
rx_user_status->udp_msdu_count;
|
||||
rx_stats_peruser->other_msdu_count =
|
||||
rx_user_status->other_msdu_count;
|
||||
rx_stats_peruser->preamble_type =
|
||||
rx_user_status->preamble_type;
|
||||
rx_stats_peruser->mpdu_cnt_fcs_ok =
|
||||
rx_user_status->mpdu_cnt_fcs_ok;
|
||||
rx_stats_peruser->mpdu_cnt_fcs_err =
|
||||
rx_user_status->mpdu_cnt_fcs_err;
|
||||
rx_stats_peruser->mpdu_fcs_ok_bitmap =
|
||||
rx_user_status->mpdu_fcs_ok_bitmap;
|
||||
rx_stats_peruser->mpdu_ok_byte_count =
|
||||
rx_user_status->mpdu_ok_byte_count;
|
||||
rx_stats_peruser->mpdu_err_byte_count =
|
||||
rx_user_status->mpdu_err_byte_count;
|
||||
|
||||
cdp_rx_ppdu->num_mpdu += rx_user_status->mpdu_cnt_fcs_ok;
|
||||
cdp_rx_ppdu->num_msdu +=
|
||||
(rx_stats_peruser->tcp_msdu_count +
|
||||
rx_stats_peruser->udp_msdu_count +
|
||||
rx_stats_peruser->other_msdu_count);
|
||||
rx_stats_peruser->retries =
|
||||
CDP_FC_IS_RETRY_SET(rx_stats_peruser->frame_control) ?
|
||||
rx_stats_peruser->mpdu_cnt_fcs_ok : 0;
|
||||
|
||||
if (rx_stats_peruser->mpdu_cnt_fcs_ok > 1)
|
||||
rx_stats_peruser->is_ampdu = 1;
|
||||
else
|
||||
rx_stats_peruser->is_ampdu = 0;
|
||||
|
||||
rx_stats_peruser->tid = ppdu_info->rx_status.tid;
|
||||
|
||||
qdf_mem_copy(rx_stats_peruser->mac_addr,
|
||||
peer->mac_addr.raw, QDF_MAC_ADDR_SIZE);
|
||||
rx_stats_peruser->peer_id = peer->peer_ids[0];
|
||||
cdp_rx_ppdu->vdev_id = peer->vdev->vdev_id;
|
||||
rx_stats_peruser->vdev_id = peer->vdev->vdev_id;
|
||||
|
||||
if (cdp_rx_ppdu->u.ppdu_type == HAL_RX_TYPE_MU_OFDMA) {
|
||||
if (rx_user_status->ofdma_info_valid) {
|
||||
rx_stats_peruser->nss = rx_user_status->nss;
|
||||
rx_stats_peruser->mcs = rx_user_status->mcs;
|
||||
rx_stats_peruser->ofdma_info_valid =
|
||||
rx_user_status->ofdma_info_valid;
|
||||
rx_stats_peruser->ofdma_ru_start_index =
|
||||
rx_user_status->dl_ofdma_ru_start_index;
|
||||
rx_stats_peruser->ofdma_ru_width =
|
||||
rx_user_status->dl_ofdma_ru_width;
|
||||
rx_stats_peruser->user_index = i;
|
||||
ru_size = rx_user_status->dl_ofdma_ru_size;
|
||||
/*
|
||||
* max RU size will be equal to
|
||||
* HTT_UL_OFDMA_V0_RU_SIZE_RU_996x2
|
||||
*/
|
||||
if (ru_size >= OFDMA_NUM_RU_SIZE) {
|
||||
dp_err("invalid ru_size %d\n",
|
||||
ru_size);
|
||||
return;
|
||||
}
|
||||
is_data = dp_rx_inc_rusize_cnt(pdev,
|
||||
rx_user_status);
|
||||
} else {
|
||||
rx_stats_peruser->ofdma_info_valid = 0;
|
||||
}
|
||||
if (is_data) {
|
||||
/* counter to get number of MU OFDMA */
|
||||
pdev->stats.ul_ofdma.data_rx_ppdu++;
|
||||
pdev->stats.ul_ofdma.data_users[num_users]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_populate_cdp_indication_ppdu() - Populate cdp rx indication structure
|
||||
* @pdev: pdev ctx
|
||||
@@ -118,6 +284,7 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
||||
struct dp_ast_entry *ast_entry;
|
||||
struct cdp_rx_indication_ppdu *cdp_rx_ppdu;
|
||||
uint32_t ast_index;
|
||||
uint32_t i;
|
||||
|
||||
cdp_rx_ppdu = (struct cdp_rx_indication_ppdu *)ppdu_nbuf->data;
|
||||
|
||||
@@ -125,34 +292,17 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
||||
ppdu_info->rx_status.first_data_seq_ctrl;
|
||||
cdp_rx_ppdu->frame_ctrl =
|
||||
ppdu_info->rx_status.frame_control;
|
||||
cdp_rx_ppdu->ppdu_id = ppdu_info->com_info.ppdu_id;
|
||||
cdp_rx_ppdu->length = ppdu_info->rx_status.ppdu_len;
|
||||
cdp_rx_ppdu->duration = ppdu_info->rx_status.duration;
|
||||
cdp_rx_ppdu->u.bw = ppdu_info->rx_status.bw;
|
||||
cdp_rx_ppdu->tcp_msdu_count = ppdu_info->rx_status.tcp_msdu_count;
|
||||
cdp_rx_ppdu->udp_msdu_count = ppdu_info->rx_status.udp_msdu_count;
|
||||
cdp_rx_ppdu->other_msdu_count = ppdu_info->rx_status.other_msdu_count;
|
||||
cdp_rx_ppdu->u.nss = ppdu_info->rx_status.nss;
|
||||
cdp_rx_ppdu->u.mcs = ppdu_info->rx_status.mcs;
|
||||
if ((ppdu_info->rx_status.sgi == VHT_SGI_NYSM) &&
|
||||
(ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC))
|
||||
cdp_rx_ppdu->u.gi = CDP_SGI_0_4_US;
|
||||
else
|
||||
cdp_rx_ppdu->u.gi = ppdu_info->rx_status.sgi;
|
||||
cdp_rx_ppdu->u.ldpc = ppdu_info->rx_status.ldpc;
|
||||
cdp_rx_ppdu->u.preamble = ppdu_info->rx_status.preamble_type;
|
||||
cdp_rx_ppdu->u.ppdu_type = ppdu_info->rx_status.reception_type;
|
||||
cdp_rx_ppdu->u.ltf_size = (ppdu_info->rx_status.he_data5 >>
|
||||
QDF_MON_STATUS_HE_LTF_SIZE_SHIFT) & 0x3;
|
||||
/* num mpdu is consolidated and added together in num user loop */
|
||||
cdp_rx_ppdu->num_mpdu = ppdu_info->com_info.mpdu_cnt_fcs_ok;
|
||||
cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
|
||||
cdp_rx_ppdu->timestamp = ppdu_info->rx_status.tsft;
|
||||
cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_num;
|
||||
cdp_rx_ppdu->beamformed = ppdu_info->rx_status.beamformed;
|
||||
/* num msdu is consolidated and added together in num user loop */
|
||||
cdp_rx_ppdu->num_msdu = (cdp_rx_ppdu->tcp_msdu_count +
|
||||
cdp_rx_ppdu->udp_msdu_count +
|
||||
cdp_rx_ppdu->other_msdu_count);
|
||||
cdp_rx_ppdu->num_bytes = ppdu_info->rx_status.ppdu_len;
|
||||
|
||||
cdp_rx_ppdu->retries = CDP_FC_IS_RETRY_SET(cdp_rx_ppdu->frame_ctrl) ?
|
||||
ppdu_info->com_info.mpdu_cnt_fcs_ok : 0;
|
||||
|
||||
@@ -160,9 +310,8 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
||||
cdp_rx_ppdu->is_ampdu = 1;
|
||||
else
|
||||
cdp_rx_ppdu->is_ampdu = 0;
|
||||
|
||||
cdp_rx_ppdu->tid = ppdu_info->rx_status.tid;
|
||||
cdp_rx_ppdu->lsig_a = ppdu_info->rx_status.rate;
|
||||
|
||||
|
||||
ast_index = ppdu_info->rx_status.ast_index;
|
||||
if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
|
||||
@@ -185,11 +334,46 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_pdev *pdev,
|
||||
peer->mac_addr.raw, QDF_MAC_ADDR_SIZE);
|
||||
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->length = ppdu_info->rx_status.ppdu_len;
|
||||
cdp_rx_ppdu->duration = ppdu_info->rx_status.duration;
|
||||
cdp_rx_ppdu->u.bw = ppdu_info->rx_status.bw;
|
||||
cdp_rx_ppdu->u.nss = ppdu_info->rx_status.nss;
|
||||
cdp_rx_ppdu->u.mcs = ppdu_info->rx_status.mcs;
|
||||
if ((ppdu_info->rx_status.sgi == VHT_SGI_NYSM) &&
|
||||
(ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC))
|
||||
cdp_rx_ppdu->u.gi = CDP_SGI_0_4_US;
|
||||
else
|
||||
cdp_rx_ppdu->u.gi = ppdu_info->rx_status.sgi;
|
||||
cdp_rx_ppdu->u.ldpc = ppdu_info->rx_status.ldpc;
|
||||
cdp_rx_ppdu->u.ppdu_type = ppdu_info->rx_status.reception_type;
|
||||
cdp_rx_ppdu->u.ltf_size = (ppdu_info->rx_status.he_data5 >>
|
||||
QDF_MON_STATUS_HE_LTF_SIZE_SHIFT) & 0x3;
|
||||
cdp_rx_ppdu->rssi = ppdu_info->rx_status.rssi_comb;
|
||||
cdp_rx_ppdu->timestamp = ppdu_info->rx_status.tsft;
|
||||
cdp_rx_ppdu->channel = ppdu_info->rx_status.chan_num;
|
||||
cdp_rx_ppdu->beamformed = ppdu_info->rx_status.beamformed;
|
||||
cdp_rx_ppdu->num_bytes = ppdu_info->rx_status.ppdu_len;
|
||||
cdp_rx_ppdu->lsig_a = ppdu_info->rx_status.rate;
|
||||
cdp_rx_ppdu->u.ltf_size = ppdu_info->rx_status.ltf_size;
|
||||
|
||||
dp_rx_populate_rx_rssi_chain(ppdu_info, cdp_rx_ppdu);
|
||||
dp_rx_populate_su_evm_details(ppdu_info, cdp_rx_ppdu);
|
||||
cdp_rx_ppdu->rx_antenna = ppdu_info->rx_status.rx_antenna;
|
||||
|
||||
cdp_rx_ppdu->nf = ppdu_info->rx_status.chan_noise_floor;
|
||||
for (i = 0; i < MAX_CHAIN; i++)
|
||||
cdp_rx_ppdu->per_chain_rssi[i] = ppdu_info->rx_status.rssi[i];
|
||||
|
||||
cdp_rx_ppdu->is_mcast_bcast = ppdu_info->nac_info.mcast_bcast;
|
||||
|
||||
cdp_rx_ppdu->num_users = ppdu_info->com_info.num_users;
|
||||
|
||||
cdp_rx_ppdu->num_mpdu = 0;
|
||||
cdp_rx_ppdu->num_msdu = 0;
|
||||
|
||||
dp_rx_populate_cdp_indication_ppdu_user(pdev, ppdu_info, ppdu_nbuf);
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
|
@@ -2894,7 +2894,8 @@ fail1:
|
||||
*
|
||||
* return:void
|
||||
*/
|
||||
static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
|
||||
static void dp_print_rx_pdev_rate_stats_tlv(struct dp_pdev *pdev,
|
||||
uint32_t *tag_buf)
|
||||
{
|
||||
htt_rx_pdev_rate_stats_tlv *dp_stats_buf =
|
||||
(htt_rx_pdev_rate_stats_tlv *)tag_buf;
|
||||
@@ -2932,6 +2933,34 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
|
||||
}
|
||||
}
|
||||
|
||||
DP_PRINT_STATS("ul_ofdma_data_rx_ppdu = %d",
|
||||
pdev->stats.ul_ofdma.data_rx_ppdu);
|
||||
|
||||
for (i = 0; i < OFDMA_NUM_USERS; i++) {
|
||||
DP_PRINT_STATS("ul_ofdma data %d user = %d",
|
||||
i, pdev->stats.ul_ofdma.data_users[i]);
|
||||
}
|
||||
|
||||
index = 0;
|
||||
qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
|
||||
for (i = 0; i < OFDMA_NUM_RU_SIZE; i++) {
|
||||
index += qdf_snprint(&str_buf[index],
|
||||
DP_MAX_STRING_LEN - index,
|
||||
" %u:%u,", i,
|
||||
pdev->stats.ul_ofdma.data_rx_ru_size[i]);
|
||||
}
|
||||
DP_PRINT_STATS("ul_ofdma_data_rx_ru_size= %s", str_buf);
|
||||
|
||||
index = 0;
|
||||
qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
|
||||
for (i = 0; i < OFDMA_NUM_RU_SIZE; i++) {
|
||||
index += qdf_snprint(&str_buf[index],
|
||||
DP_MAX_STRING_LEN - index,
|
||||
" %u:%u,", i,
|
||||
pdev->stats.ul_ofdma.nondata_rx_ru_size[i]);
|
||||
}
|
||||
DP_PRINT_STATS("ul_ofdma_nondata_rx_ru_size= %s", str_buf);
|
||||
|
||||
DP_PRINT_STATS("HTT_RX_PDEV_RATE_STATS_TLV:");
|
||||
DP_PRINT_STATS("mac_id__word = %u",
|
||||
dp_stats_buf->mac_id__word);
|
||||
@@ -2960,6 +2989,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
|
||||
DP_PRINT_STATS("txbf = %u",
|
||||
dp_stats_buf->txbf);
|
||||
|
||||
index = 0;
|
||||
qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
|
||||
for (i = 0; i < DP_HTT_RX_MCS_LEN; i++) {
|
||||
index += qdf_snprint(&str_buf[index],
|
||||
@@ -3592,12 +3622,14 @@ static inline void dp_print_rx_pdev_fw_stats_phy_err_tlv(uint32_t *tag_buf)
|
||||
/*
|
||||
* dp_htt_stats_print_tag: function to select the tag type and
|
||||
* print the corresponding tag structure
|
||||
* @pdev: pdev pointer
|
||||
* @tag_type: tag type that is to be printed
|
||||
* @tag_buf: pointer to the tag structure
|
||||
*
|
||||
* return: void
|
||||
*/
|
||||
void dp_htt_stats_print_tag(uint8_t tag_type, uint32_t *tag_buf)
|
||||
void dp_htt_stats_print_tag(struct dp_pdev *pdev,
|
||||
uint8_t tag_type, uint32_t *tag_buf)
|
||||
{
|
||||
switch (tag_type) {
|
||||
case HTT_STATS_TX_PDEV_CMN_TAG:
|
||||
@@ -3739,7 +3771,7 @@ void dp_htt_stats_print_tag(uint8_t tag_type, uint32_t *tag_buf)
|
||||
break;
|
||||
|
||||
case HTT_STATS_RX_PDEV_RATE_STATS_TAG:
|
||||
dp_print_rx_pdev_rate_stats_tlv(tag_buf);
|
||||
dp_print_rx_pdev_rate_stats_tlv(pdev, tag_buf);
|
||||
break;
|
||||
|
||||
case HTT_STATS_TX_PDEV_SCHEDULER_TXQ_STATS_TAG:
|
||||
|
@@ -416,6 +416,16 @@ enum {
|
||||
HAL_RX_MON_PPDU_END,
|
||||
};
|
||||
|
||||
/* struct hal_rx_ppdu_common_info - common ppdu info
|
||||
* @ppdu_id - ppdu id number
|
||||
* @ppdu_timestamp - timestamp at ppdu received
|
||||
* @mpdu_cnt_fcs_ok - mpdu count in ppdu with fcs ok
|
||||
* @mpdu_cnt_fcs_err - mpdu count in ppdu with fcs err
|
||||
* @mpdu_fcs_ok_bitmap - fcs ok mpdu count in ppdu bitmap
|
||||
* @last_ppdu_id - last received ppdu id
|
||||
* @mpdu_cnt - total mpdu count
|
||||
* @num_users - num users
|
||||
*/
|
||||
struct hal_rx_ppdu_common_info {
|
||||
uint32_t ppdu_id;
|
||||
uint32_t ppdu_timestamp;
|
||||
@@ -446,6 +456,7 @@ struct hal_rx_msdu_payload_info {
|
||||
* @to_ds_flag: flag indicate to_ds bit
|
||||
* @mac_addr2_valid: flag indicate if mac_addr2 is valid
|
||||
* @mac_addr2: mac address2 in wh
|
||||
* @mcast_bcast: multicast/broadcast
|
||||
*/
|
||||
struct hal_rx_nac_info {
|
||||
uint8_t fc_valid;
|
||||
@@ -453,6 +464,7 @@ struct hal_rx_nac_info {
|
||||
uint8_t to_ds_flag;
|
||||
uint8_t mac_addr2_valid;
|
||||
uint8_t mac_addr2[QDF_MAC_ADDR_SIZE];
|
||||
uint8_t mcast_bcast;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -262,12 +262,67 @@ hal_rx_handle_ofdma_info(
|
||||
SW_RESPONSE_REFERENCE_PTR_EXT);
|
||||
}
|
||||
|
||||
static inline void
|
||||
hal_rx_populate_mu_user_info(void *rx_tlv, void *ppduinfo,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
struct hal_rx_ppdu_info *ppdu_info =
|
||||
(struct hal_rx_ppdu_info *)ppduinfo;
|
||||
uint32_t mpdu_ok_byte_count;
|
||||
uint32_t mpdu_err_byte_count;
|
||||
|
||||
mon_rx_user_status->ast_index = ppdu_info->rx_status.ast_index;
|
||||
mon_rx_user_status->tid = ppdu_info->rx_status.tid;
|
||||
mon_rx_user_status->tcp_msdu_count =
|
||||
ppdu_info->rx_status.tcp_msdu_count;
|
||||
mon_rx_user_status->udp_msdu_count =
|
||||
ppdu_info->rx_status.udp_msdu_count;
|
||||
mon_rx_user_status->other_msdu_count =
|
||||
ppdu_info->rx_status.other_msdu_count;
|
||||
mon_rx_user_status->frame_control = ppdu_info->rx_status.frame_control;
|
||||
mon_rx_user_status->frame_control_info_valid =
|
||||
ppdu_info->rx_status.frame_control_info_valid;
|
||||
mon_rx_user_status->data_sequence_control_info_valid =
|
||||
ppdu_info->rx_status.data_sequence_control_info_valid;
|
||||
mon_rx_user_status->first_data_seq_ctrl =
|
||||
ppdu_info->rx_status.first_data_seq_ctrl;
|
||||
mon_rx_user_status->preamble_type = ppdu_info->rx_status.preamble_type;
|
||||
mon_rx_user_status->ht_flags = ppdu_info->rx_status.ht_flags;
|
||||
mon_rx_user_status->rtap_flags = ppdu_info->rx_status.rtap_flags;
|
||||
mon_rx_user_status->vht_flags = ppdu_info->rx_status.vht_flags;
|
||||
mon_rx_user_status->he_flags = ppdu_info->rx_status.he_flags;
|
||||
mon_rx_user_status->rs_flags = ppdu_info->rx_status.rs_flags;
|
||||
|
||||
mon_rx_user_status->mpdu_cnt_fcs_ok =
|
||||
ppdu_info->com_info.mpdu_cnt_fcs_ok;
|
||||
mon_rx_user_status->mpdu_cnt_fcs_err =
|
||||
ppdu_info->com_info.mpdu_cnt_fcs_err;
|
||||
mon_rx_user_status->mpdu_fcs_ok_bitmap =
|
||||
ppdu_info->com_info.mpdu_fcs_ok_bitmap;
|
||||
|
||||
mpdu_ok_byte_count = HAL_RX_GET(rx_tlv,
|
||||
RX_PPDU_END_USER_STATS_17,
|
||||
MPDU_OK_BYTE_COUNT);
|
||||
mpdu_err_byte_count = HAL_RX_GET(rx_tlv,
|
||||
RX_PPDU_END_USER_STATS_19,
|
||||
MPDU_ERR_BYTE_COUNT);
|
||||
|
||||
mon_rx_user_status->mpdu_ok_byte_count = mpdu_ok_byte_count;
|
||||
mon_rx_user_status->mpdu_err_byte_count = mpdu_err_byte_count;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void
|
||||
hal_rx_handle_ofdma_info(void *rx_tlv,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
hal_rx_populate_mu_user_info(void *rx_tlv, void *ppduinfo,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HAL_RX_UPDATE_RSSI_PER_CHAIN_BW(chain, word_1, word_2, \
|
||||
@@ -379,6 +434,7 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
com_info->mpdu_cnt = 0;
|
||||
com_info->last_ppdu_id =
|
||||
com_info->ppdu_id;
|
||||
com_info->num_users = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -408,6 +464,10 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
RX_PPDU_DURATION);
|
||||
break;
|
||||
|
||||
/*
|
||||
* WIFIRX_PPDU_END_USER_STATS_E comes for each user received.
|
||||
* for MU, based on num users we see this tlv that many times.
|
||||
*/
|
||||
case WIFIRX_PPDU_END_USER_STATS_E:
|
||||
{
|
||||
unsigned long tid = 0;
|
||||
@@ -471,14 +531,6 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (user_id < HAL_MAX_UL_MU_USERS) {
|
||||
mon_rx_user_status =
|
||||
&ppdu_info->rx_user_status[user_id];
|
||||
|
||||
hal_rx_handle_ofdma_info(rx_tlv, mon_rx_user_status);
|
||||
|
||||
ppdu_info->com_info.num_users++;
|
||||
}
|
||||
|
||||
ppdu_info->com_info.mpdu_cnt_fcs_ok =
|
||||
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_3,
|
||||
@@ -506,6 +558,17 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
FCS_OK_BITMAP_31_0)) &
|
||||
HAL_RX_MPDU_FCS_BITMAP_0_31_OFFSET);
|
||||
|
||||
if (user_id < HAL_MAX_UL_MU_USERS) {
|
||||
mon_rx_user_status =
|
||||
&ppdu_info->rx_user_status[user_id];
|
||||
|
||||
hal_rx_handle_ofdma_info(rx_tlv, mon_rx_user_status);
|
||||
|
||||
ppdu_info->com_info.num_users++;
|
||||
|
||||
hal_rx_populate_mu_user_info(rx_tlv, ppdu_info,
|
||||
mon_rx_user_status);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1185,6 +1248,8 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
QDF_MON_STATUS_HE_MU_FORMAT_TYPE;
|
||||
break;
|
||||
default:
|
||||
ppdu_info->rx_status.reception_type =
|
||||
HAL_RX_TYPE_SU;
|
||||
break;
|
||||
}
|
||||
hal_rx_update_rssi_chain(ppdu_info, rssi_info_tlv);
|
||||
@@ -1322,6 +1387,10 @@ hal_rx_status_get_tlv_info_generic(void *rx_tlv_hdr, void *ppduinfo,
|
||||
else if (filter_category == 1)
|
||||
ppdu_info->rx_status.monitor_direct_used = 1;
|
||||
|
||||
ppdu_info->nac_info.mcast_bcast =
|
||||
HAL_RX_GET(rx_mpdu_start,
|
||||
RX_MPDU_INFO_13,
|
||||
MCAST_BCAST);
|
||||
break;
|
||||
}
|
||||
case WIFIRX_MPDU_END_E:
|
||||
|
@@ -321,22 +321,63 @@ struct mon_rx_status {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mon_rx_status - This will have monitor mode per user rx_status
|
||||
* struct mon_rx_user_status - This will have monitor mode per user rx_status
|
||||
* extracted from hardware TLV.
|
||||
* @mcs: MCS index of Rx frame
|
||||
* @nss: Number of spatial streams
|
||||
* @ofdma_info_valid: OFDMA info below is valid
|
||||
* @dl_ofdma_ru_start_index: OFDMA RU start index
|
||||
* @dl_ofdma_ru_width: OFDMA total RU width
|
||||
* @ast_index: AST table hash index
|
||||
* @tid: QoS traffic tid number
|
||||
* @tcp_msdu_count: tcp protocol msdu count
|
||||
* @udp_msdu_count: udp protocol msdu count
|
||||
* @other_msdu_count: other protocol msdu count
|
||||
* @frame_control: frame control field
|
||||
* @frame_control_info_valid: field indicates if fc value is valid
|
||||
* @data_sequence_control_info_valid: field to indicate validity of seq control
|
||||
* @first_data_seq_ctrl: Sequence ctrl field of first data frame
|
||||
* @preamble_type: Preamble type in radio header
|
||||
* @ht_flags: HT flags, only present for HT frames.
|
||||
* @vht_flags: VHT flags, only present for VHT frames.
|
||||
* @he_flags: HE (11ax) flags, only present in HE frames
|
||||
* @rtap_flags: Bit map of available fields in the radiotap
|
||||
* @rs_flags: Flags to indicate AMPDU or AMSDU aggregation
|
||||
* @mpdu_cnt_fcs_ok: mpdu count received with fcs ok
|
||||
* @mpdu_cnt_fcs_err: mpdu count received with fcs ok bitmap
|
||||
* @mpdu_fcs_ok_bitmap: mpdu with fcs ok bitmap
|
||||
* @mpdu_ok_byte_count: mpdu byte count with fcs ok
|
||||
* @mpdu_err_byte_count: mpdu byte count with fcs err
|
||||
*/
|
||||
struct mon_rx_user_status {
|
||||
uint32_t mcs:4,
|
||||
nss:3,
|
||||
ofdma_info_valid:1,
|
||||
dl_ofdma_ru_start_index:7,
|
||||
dl_ofdma_ru_width:7;
|
||||
dl_ofdma_ru_width:7,
|
||||
dl_ofdma_ru_size:8;
|
||||
uint32_t ul_ofdma_user_v0_word0;
|
||||
uint32_t ul_ofdma_user_v0_word1;
|
||||
uint32_t ast_index;
|
||||
uint32_t tid;
|
||||
uint16_t tcp_msdu_count;
|
||||
uint16_t udp_msdu_count;
|
||||
uint16_t other_msdu_count;
|
||||
uint16_t frame_control;
|
||||
uint8_t frame_control_info_valid;
|
||||
uint8_t data_sequence_control_info_valid;
|
||||
uint16_t first_data_seq_ctrl;
|
||||
uint32_t preamble_type;
|
||||
uint16_t ht_flags;
|
||||
uint16_t vht_flags;
|
||||
uint16_t he_flags;
|
||||
uint8_t rtap_flags;
|
||||
uint8_t rs_flags;
|
||||
uint32_t mpdu_cnt_fcs_ok;
|
||||
uint32_t mpdu_cnt_fcs_err;
|
||||
uint64_t mpdu_fcs_ok_bitmap;
|
||||
uint32_t mpdu_ok_byte_count;
|
||||
uint32_t mpdu_err_byte_count;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -74,6 +74,9 @@ typedef __in6_addr_t in6_addr_t;
|
||||
#define QDF_IEEE80211_FC0_SUBTYPE_DATA 0x00
|
||||
#define QDF_IEEE80211_FC0_SUBTYPE_QOS 0x80
|
||||
|
||||
#define QDF_IEEE80211_FC0_SUBTYPE_QOS_NULL 0xC0
|
||||
#define QDF_IEEE80211_FC0_SUBTYPE_NODATA 0x40
|
||||
|
||||
#define QDF_NET_IS_MAC_MULTICAST(_a) (*(_a) & 0x01)
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user