Merge "qcacmn: Change format specifier %p to %pK"

This commit is contained in:
Linux Build Service Account
2017-11-15 11:57:36 -08:00
committed by Gerrit - the friendly Code Review server
10 changed files with 240 additions and 98 deletions

View File

@@ -52,7 +52,7 @@
#define MAX_MCS (12 + 1) #define MAX_MCS (12 + 1)
#define MAX_MCS_11A 8 #define MAX_MCS_11A 8
#define MAX_MCS_11B 7 #define MAX_MCS_11B 7
#define MAX_MCS_11AC 10 #define MAX_MCS_11AC 12
/* 1 additional GI is for invalid values */ /* 1 additional GI is for invalid values */
#define MAX_GI (4 + 1) #define MAX_GI (4 + 1)
#define SS_COUNT 8 #define SS_COUNT 8
@@ -849,6 +849,8 @@ struct cdp_rx_stats {
uint32_t amsdu_cnt; uint32_t amsdu_cnt;
/* Number of bar received */ /* Number of bar received */
uint32_t bar_recv_cnt; uint32_t bar_recv_cnt;
/* RSSI of received signal */
uint32_t rssi;
}; };
/* Tx ingress Stats */ /* Tx ingress Stats */
@@ -1199,7 +1201,11 @@ struct cdp_tx_completion_msdu {
* @ppdu_id: PPDU Id * @ppdu_id: PPDU Id
* @is_ampdu: mpdu aggregate or non-aggregate? * @is_ampdu: mpdu aggregate or non-aggregate?
* @num_mpdu: Number of MPDUs in PPDU * @num_mpdu: Number of MPDUs in PPDU
* @reserved: Reserved bits for future use
* @num_msdu: Number of MSDUs in PPDU * @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
* @duration: PPDU duration * @duration: PPDU duration
* @tid: TID number * @tid: TID number
* @peer_id: Peer ID * @peer_id: Peer ID
@@ -1232,9 +1238,13 @@ struct cdp_tx_completion_msdu {
*/ */
struct cdp_rx_indication_ppdu { struct cdp_rx_indication_ppdu {
uint32_t ppdu_id; uint32_t ppdu_id;
uint32_t is_ampdu:1, uint16_t is_ampdu:1,
num_mpdu:9, num_mpdu:9,
num_msdu:16; reserved:6;
uint32_t num_msdu;
uint16_t udp_msdu_count;
uint16_t tcp_msdu_count;
uint16_t other_msdu_count;
uint16_t duration; uint16_t duration;
uint32_t tid:8, uint32_t tid:8,
peer_id:16; peer_id:16;

View File

@@ -60,6 +60,12 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
struct cdp_tx_completion_ppdu_user *ppdu, uint32_t ack_rssi) struct cdp_tx_completion_ppdu_user *ppdu, uint32_t ack_rssi)
{ {
struct dp_pdev *pdev = peer->vdev->pdev; struct dp_pdev *pdev = peer->vdev->pdev;
uint8_t preamble, mcs;
uint16_t num_msdu;
preamble = ppdu->preamble;
mcs = ppdu->mcs;
num_msdu = ppdu->num_msdu;
/* If the peer statistics are already processed as part of /* If the peer statistics are already processed as part of
* per-MSDU completion handler, do not process these again in per-PPDU * per-MSDU completion handler, do not process these again in per-PPDU
@@ -68,12 +74,8 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
return; return;
DP_STATS_INC_PKT(peer, tx.comp_pkt, DP_STATS_INC_PKT(peer, tx.comp_pkt,
(ppdu->success_msdus + ppdu->retry_msdus + num_msdu, ppdu->success_bytes);
ppdu->failed_msdus),
ppdu->success_bytes);
DP_STATS_INC(peer, tx.tx_failed, ppdu->failed_msdus); DP_STATS_INC(peer, tx.tx_failed, ppdu->failed_msdus);
DP_STATS_INC(peer,
tx.pkt_type[ppdu->preamble].mcs_count[ppdu->mcs], 1);
DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], 1); DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], 1);
DP_STATS_INC(peer, tx.bw[ppdu->bw], 1); DP_STATS_INC(peer, tx.bw[ppdu->bw], 1);
DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi); DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi);
@@ -84,6 +86,36 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
ppdu->success_bytes); ppdu->success_bytes);
DP_STATS_INC(peer, tx.retries, DP_STATS_INC(peer, tx.retries,
(ppdu->long_retries + ppdu->short_retries)); (ppdu->long_retries + ppdu->short_retries));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11B) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < (MAX_MCS_11B)) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= (MAX_MCS - 1)) && (preamble == DOT11_AX)));
DP_STATS_INCC(peer,
tx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < (MAX_MCS - 1)) && (preamble == DOT11_AX)));
if (soc->cdp_soc.ol_ops->update_dp_stats) { if (soc->cdp_soc.ol_ops->update_dp_stats) {
soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev, soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
@@ -2004,9 +2036,13 @@ static void dp_txrx_ppdu_stats_handler(struct dp_soc *soc,
ppdu_desc->num_mpdu += ppdu_desc->user[i].num_mpdu; ppdu_desc->num_mpdu += ppdu_desc->user[i].num_mpdu;
ppdu_desc->num_msdu += ppdu_desc->user[i].num_msdu; ppdu_desc->num_msdu += ppdu_desc->user[i].num_msdu;
dp_tx_stats_update(soc, peer, &ppdu_desc->user[i],
if (ppdu_desc->frame_type == CDP_PPDU_FTYPE_DATA) {
dp_tx_stats_update(soc, peer,
&ppdu_desc->user[i],
ppdu_desc->ack_rssi); ppdu_desc->ack_rssi);
} }
}
dp_wdi_event_handler(WDI_EVENT_TX_PPDU_DESC, soc, dp_wdi_event_handler(WDI_EVENT_TX_PPDU_DESC, soc,
pdev->tx_ppdu_info.buf, HTT_INVALID_PEER, pdev->tx_ppdu_info.buf, HTT_INVALID_PEER,

View File

@@ -170,7 +170,7 @@ static const struct dp_rate_debug dp_rate_string[DOT11_MAX][MAX_MCS] = {
{"VHT MCS 8 (256-QAM 3/4) ", MCS_VALID}, {"VHT MCS 8 (256-QAM 3/4) ", MCS_VALID},
{"VHT MCS 9 (256-QAM 5/6) ", MCS_VALID}, {"VHT MCS 9 (256-QAM 5/6) ", MCS_VALID},
{"VHT MCS 10 (1024-QAM 3/4)", MCS_VALID}, {"VHT MCS 10 (1024-QAM 3/4)", MCS_VALID},
{"VHT MCS 10 (1024-QAM 5/6)", MCS_VALID}, {"VHT MCS 11 (1024-QAM 5/6)", MCS_VALID},
{"INVALID ", MCS_VALID}, {"INVALID ", MCS_VALID},
}, },
{ {
@@ -185,7 +185,7 @@ static const struct dp_rate_debug dp_rate_string[DOT11_MAX][MAX_MCS] = {
{"HE MCS 8 (256-QAM 3/4) ", MCS_VALID}, {"HE MCS 8 (256-QAM 3/4) ", MCS_VALID},
{"HE MCS 9 (256-QAM 5/6) ", MCS_VALID}, {"HE MCS 9 (256-QAM 5/6) ", MCS_VALID},
{"HE MCS 10 (1024-QAM 3/4)", MCS_VALID}, {"HE MCS 10 (1024-QAM 3/4)", MCS_VALID},
{"HE MCS 10 (1024-QAM 5/6)", MCS_VALID}, {"HE MCS 11 (1024-QAM 5/6)", MCS_VALID},
{"INVALID ", MCS_VALID}, {"INVALID ", MCS_VALID},
} }
}; };

View File

@@ -913,21 +913,21 @@ dp_rx_process(struct dp_intr *int_ctx, void *hal_ring, uint32_t quota)
struct dp_peer *peer = NULL; struct dp_peer *peer = NULL;
struct dp_vdev *vdev = NULL; struct dp_vdev *vdev = NULL;
uint32_t pkt_len; uint32_t pkt_len;
struct hal_rx_mpdu_desc_info mpdu_desc_info; struct hal_rx_mpdu_desc_info mpdu_desc_info = { 0 };
struct hal_rx_msdu_desc_info msdu_desc_info; struct hal_rx_msdu_desc_info msdu_desc_info = { 0 };
enum hal_reo_error_status error; enum hal_reo_error_status error;
uint32_t peer_mdata; uint32_t peer_mdata;
uint8_t *rx_tlv_hdr; uint8_t *rx_tlv_hdr;
uint32_t rx_bufs_reaped[MAX_PDEV_CNT] = { 0 }; uint32_t rx_bufs_reaped[MAX_PDEV_CNT] = { 0 };
uint32_t sgi, mcs, tid, nss, bw, reception_type, pkt_type; uint32_t sgi, mcs, tid, nss, bw, reception_type, pkt_type;
uint8_t mac_id; uint8_t mac_id = 0;
uint32_t ampdu_flag, amsdu_flag; uint32_t ampdu_flag, amsdu_flag;
struct dp_pdev *pdev; struct dp_pdev *pdev;
struct dp_srng *dp_rxdma_srng; struct dp_srng *dp_rxdma_srng;
struct rx_desc_pool *rx_desc_pool; struct rx_desc_pool *rx_desc_pool;
struct dp_soc *soc = int_ctx->soc; struct dp_soc *soc = int_ctx->soc;
uint8_t ring_id; uint8_t ring_id = 0;
uint8_t core_id; uint8_t core_id = 0;
bool is_first_frag = 0; bool is_first_frag = 0;
uint16_t mpdu_len = 0; uint16_t mpdu_len = 0;
qdf_nbuf_t head_frag_nbuf = NULL; qdf_nbuf_t head_frag_nbuf = NULL;
@@ -949,6 +949,7 @@ dp_rx_process(struct dp_intr *int_ctx, void *hal_ring, uint32_t quota)
qdf_assert(hal_soc); qdf_assert(hal_soc);
hif_pm_runtime_mark_last_busy(soc->osdev->dev); hif_pm_runtime_mark_last_busy(soc->osdev->dev);
sgi = mcs = tid = nss = bw = reception_type = pkt_type = 0;
if (qdf_unlikely(hal_srng_access_start(hal_soc, hal_ring))) { if (qdf_unlikely(hal_srng_access_start(hal_soc, hal_ring))) {
@@ -1200,8 +1201,6 @@ done:
qdf_nbuf_set_rx_cksum(nbuf, &cksum); qdf_nbuf_set_rx_cksum(nbuf, &cksum);
} }
sgi = hal_rx_msdu_start_sgi_get(rx_tlv_hdr);
mcs = hal_rx_msdu_start_rate_mcs_get(rx_tlv_hdr);
tid = hal_rx_mpdu_start_tid_get(rx_tlv_hdr); tid = hal_rx_mpdu_start_tid_get(rx_tlv_hdr);
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
@@ -1213,15 +1212,12 @@ done:
rx_tlv_hdr); rx_tlv_hdr);
nss = hal_rx_msdu_start_nss_get(rx_tlv_hdr); nss = hal_rx_msdu_start_nss_get(rx_tlv_hdr);
pkt_type = hal_rx_msdu_start_get_pkt_type(rx_tlv_hdr); pkt_type = hal_rx_msdu_start_get_pkt_type(rx_tlv_hdr);
DP_STATS_INC(vdev->pdev, rx.bw[bw], 1);
DP_STATS_INC(vdev->pdev, DP_STATS_INC(vdev->pdev,
rx.reception_type[reception_type], 1); rx.reception_type[reception_type], 1);
DP_STATS_INCC(vdev->pdev, rx.nss[nss], 1, DP_STATS_INCC(vdev->pdev, rx.nss[nss], 1,
((reception_type == REPT_MU_MIMO) || ((reception_type == REPT_MU_MIMO) ||
(reception_type == REPT_MU_OFDMA_MIMO)) (reception_type == REPT_MU_OFDMA_MIMO))
); );
DP_STATS_INC(peer, rx.sgi_count[sgi], 1);
DP_STATS_INCC(peer, rx.err.mic_err, 1, DP_STATS_INCC(peer, rx.err.mic_err, 1,
hal_rx_mpdu_end_mic_err_get( hal_rx_mpdu_end_mic_err_get(
rx_tlv_hdr)); rx_tlv_hdr));
@@ -1231,50 +1227,58 @@ done:
DP_STATS_INC(peer, rx.wme_ac_type[TID_TO_WME_AC(tid)], DP_STATS_INC(peer, rx.wme_ac_type[TID_TO_WME_AC(tid)],
1); 1);
DP_STATS_INC(peer, rx.bw[bw], 1);
DP_STATS_INC(peer, rx.reception_type[reception_type], DP_STATS_INC(peer, rx.reception_type[reception_type],
1); 1);
if (soc->process_rx_status) {
ampdu_flag = (mpdu_desc_info.mpdu_flags &
HAL_MPDU_F_AMPDU_FLAG);
sgi = hal_rx_msdu_start_sgi_get(rx_tlv_hdr);
mcs = hal_rx_msdu_start_rate_mcs_get(rx_tlv_hdr);
DP_STATS_INC(peer, rx.bw[bw], 1);
DP_STATS_INC(peer, rx.sgi_count[sgi], 1);
DP_STATS_INCC(peer, rx.ampdu_cnt, 1, ampdu_flag);
DP_STATS_INCC(peer, rx.non_ampdu_cnt, 1, !(ampdu_flag));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[MAX_MCS], 1, mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11A) && (pkt_type ((mcs >= MAX_MCS_11A) &&
== DOT11_A))); (pkt_type == DOT11_A)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[mcs], 1, mcs_count[mcs], 1,
((mcs <= MAX_MCS_11A) && (pkt_type ((mcs < MAX_MCS_11A) &&
== DOT11_A))); (pkt_type == DOT11_A)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[MAX_MCS], 1, mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11B) ((mcs >= MAX_MCS_11B) &&
&& (pkt_type == DOT11_B))); (pkt_type == DOT11_B)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[mcs], 1, mcs_count[mcs], 1,
((mcs <= MAX_MCS_11B) ((mcs < MAX_MCS_11B) &&
&& (pkt_type == DOT11_B))); (pkt_type == DOT11_B)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[MAX_MCS], 1, mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11A) ((mcs >= MAX_MCS_11A) &&
&& (pkt_type == DOT11_N))); (pkt_type == DOT11_N)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[mcs], 1, mcs_count[mcs], 1,
((mcs <= MAX_MCS_11A) ((mcs < MAX_MCS_11A) &&
&& (pkt_type == DOT11_N))); (pkt_type == DOT11_N)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[MAX_MCS], 1, mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11AC) ((mcs >= MAX_MCS_11AC) &&
&& (pkt_type == DOT11_AC))); (pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[mcs], 1, mcs_count[mcs], 1,
((mcs <= MAX_MCS_11AC) ((mcs < MAX_MCS_11AC) &&
&& (pkt_type == DOT11_AC))); (pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[MAX_MCS], 1, mcs_count[MAX_MCS], 1,
((mcs >= (MAX_MCS-1)) ((mcs >= (MAX_MCS - 1)) &&
&& (pkt_type == DOT11_AX))); (pkt_type == DOT11_AX)));
DP_STATS_INCC(peer, rx.pkt_type[pkt_type]. DP_STATS_INCC(peer, rx.pkt_type[pkt_type].
mcs_count[mcs], 1, mcs_count[mcs], 1,
((mcs <= (MAX_MCS-1)) ((mcs < (MAX_MCS - 1)) &&
&& (pkt_type == DOT11_AX))); (pkt_type == DOT11_AX)));
}
/* /*
* HW structures call this L3 header padding -- * HW structures call this L3 header padding --
@@ -1449,7 +1453,7 @@ dp_rx_pdev_attach(struct dp_pdev *pdev)
qdf_spinlock_create(&soc->rx_desc_mutex[pdev_id]); qdf_spinlock_create(&soc->rx_desc_mutex[pdev_id]);
pdev = soc->pdev_list[pdev_id]; pdev = soc->pdev_list[pdev_id];
rxdma_srng = pdev->rx_refill_buf_ring; rxdma_srng = pdev->rx_refill_buf_ring;
soc->process_rx_status = 0;
rxdma_entries = rxdma_srng.alloc_size/hal_srng_get_entrysize( rxdma_entries = rxdma_srng.alloc_size/hal_srng_get_entrysize(
soc->hal_soc, RXDMA_BUF); soc->hal_soc, RXDMA_BUF);

View File

@@ -74,12 +74,18 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc,
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;
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.nss = ppdu_info->rx_status.nss;
cdp_rx_ppdu->u.mcs = ppdu_info->rx_status.mcs; cdp_rx_ppdu->u.mcs = ppdu_info->rx_status.mcs;
cdp_rx_ppdu->u.preamble = ppdu_info->rx_status.preamble_type; cdp_rx_ppdu->u.preamble = ppdu_info->rx_status.preamble_type;
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;
cdp_rx_ppdu->num_msdu = (cdp_rx_ppdu->tcp_msdu_count +
cdp_rx_ppdu->udp_msdu_count +
cdp_rx_ppdu->other_msdu_count);
} }
#else #else
static inline void static inline void
@@ -89,6 +95,77 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc,
{ {
} }
#endif #endif
/**
* dp_rx_stats_update() - Update per-peer statistics
* @soc: Datapath SOC handle
* @peer: Datapath peer handle
* @ppdu: PPDU Descriptor
*
* Return: None
*/
#ifdef FEATURE_PERPKT_INFO
static void dp_rx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
struct cdp_rx_indication_ppdu *ppdu)
{
struct dp_pdev *pdev = NULL;
uint8_t mcs, preamble;
uint16_t num_msdu;
mcs = ppdu->u.mcs;
preamble = ppdu->u.preamble;
num_msdu = ppdu->num_msdu;
if (!peer)
return;
pdev = peer->vdev->pdev;
if (soc->process_rx_status)
return;
DP_STATS_UPD(peer, rx.rssi, ppdu->rssi);
DP_STATS_INC(peer, rx.sgi_count[ppdu->u.gi], 1);
DP_STATS_INC(peer, rx.bw[ppdu->u.bw], num_msdu);
DP_STATS_INCC(peer, rx.ampdu_cnt, 1, ppdu->is_ampdu);
DP_STATS_INCC(peer, rx.non_ampdu_cnt, 1, !(ppdu->is_ampdu));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_A)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11B) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11B) && (preamble == DOT11_B)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11A) && (preamble == DOT11_N)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < MAX_MCS_11AC) && (preamble == DOT11_AC)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[MAX_MCS], num_msdu,
((mcs >= (MAX_MCS - 1)) && (preamble == DOT11_AX)));
DP_STATS_INCC(peer,
rx.pkt_type[preamble].mcs_count[mcs], num_msdu,
((mcs < (MAX_MCS - 1)) && (preamble == DOT11_AX)));
DP_STATS_INC(peer, rx.wme_ac_type[TID_TO_WME_AC(ppdu->tid)], 1);
if (soc->cdp_soc.ol_ops->update_dp_stats) {
soc->cdp_soc.ol_ops->update_dp_stats(pdev->osif_pdev,
&peer->stats, ppdu->peer_id,
UPDATE_PEER_STATS);
}
}
#endif
/** /**
* dp_rx_handle_ppdu_stats() - Allocate and deliver ppdu stats to cdp layer * dp_rx_handle_ppdu_stats() - Allocate and deliver ppdu stats to cdp layer
@@ -117,6 +194,7 @@ dp_rx_handle_ppdu_stats(struct dp_soc *soc, struct dp_pdev *pdev,
peer = dp_peer_find_by_id(soc, cdp_rx_ppdu->peer_id); peer = dp_peer_find_by_id(soc, cdp_rx_ppdu->peer_id);
if (peer && cdp_rx_ppdu->peer_id != HTT_INVALID_PEER) { if (peer && cdp_rx_ppdu->peer_id != HTT_INVALID_PEER) {
dp_rx_stats_update(soc, peer, cdp_rx_ppdu);
dp_wdi_event_handler(WDI_EVENT_RX_PPDU_DESC, soc, dp_wdi_event_handler(WDI_EVENT_RX_PPDU_DESC, soc,
ppdu_nbuf, cdp_rx_ppdu->peer_id, ppdu_nbuf, cdp_rx_ppdu->peer_id,
WDI_NO_VAL, pdev->pdev_id); WDI_NO_VAL, pdev->pdev_id);

View File

@@ -1995,14 +1995,15 @@ static void dp_tx_update_peer_stats(struct dp_peer *peer,
{ {
struct dp_pdev *pdev = peer->vdev->pdev; struct dp_pdev *pdev = peer->vdev->pdev;
struct dp_soc *soc = pdev->soc; struct dp_soc *soc = pdev->soc;
uint8_t mcs, pkt_type;
mcs = ts->mcs;
pkt_type = ts->pkt_type;
DP_STATS_INC_PKT(peer, tx.comp_pkt, 1, length);
if (!ts->release_src == HAL_TX_COMP_RELEASE_SOURCE_TQM) if (!ts->release_src == HAL_TX_COMP_RELEASE_SOURCE_TQM)
return; return;
DP_STATS_INCC(peer, tx.tx_failed, 1,
!(ts->status == HAL_TX_TQM_RR_FRAME_ACKED));
DP_STATS_INCC(peer, tx.dropped.age_out, 1, DP_STATS_INCC(peer, tx.dropped.age_out, 1,
(ts->status == HAL_TX_TQM_RR_REM_CMD_AGED)); (ts->status == HAL_TX_TQM_RR_REM_CMD_AGED));
@@ -2018,39 +2019,39 @@ static void dp_tx_update_peer_stats(struct dp_peer *peer,
if (!ts->status == HAL_TX_TQM_RR_FRAME_ACKED) if (!ts->status == HAL_TX_TQM_RR_FRAME_ACKED)
return; return;
DP_STATS_INCC(peer, tx.ofdma, 1, ts->ofdma);
DP_STATS_INCC(peer, tx.amsdu_cnt, 1, ts->msdu_part_of_amsdu);
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[MAX_MCS], 1, if (!(soc->process_tx_status))
((ts->mcs >= MAX_MCS_11A) && (ts->pkt_type == DOT11_A))); return;
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[ts->mcs], 1,
((ts->mcs <= MAX_MCS_11A) && (ts->pkt_type == DOT11_A)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[MAX_MCS], 1,
((ts->mcs >= MAX_MCS_11B) && (ts->pkt_type == DOT11_B)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[ts->mcs], 1,
((ts->mcs <= MAX_MCS_11B) && (ts->pkt_type == DOT11_B)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[MAX_MCS], 1,
((ts->mcs >= MAX_MCS_11A) && (ts->pkt_type == DOT11_N)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[ts->mcs], 1,
((ts->mcs <= MAX_MCS_11A) && (ts->pkt_type == DOT11_N)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[MAX_MCS], 1,
((ts->mcs >= MAX_MCS_11AC) && (ts->pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[ts->mcs], 1,
((ts->mcs <= MAX_MCS_11AC) && (ts->pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[MAX_MCS], 1,
((ts->mcs >= (MAX_MCS-1)) && (ts->pkt_type == DOT11_AX)));
DP_STATS_INCC(peer, tx.pkt_type[ts->pkt_type].mcs_count[ts->mcs], 1,
((ts->mcs <= (MAX_MCS-1)) && (ts->pkt_type == DOT11_AX)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11A) && (pkt_type == DOT11_A)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[mcs], 1,
((mcs < (MAX_MCS_11A)) && (pkt_type == DOT11_A)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11B) && (pkt_type == DOT11_B)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[mcs], 1,
((mcs < MAX_MCS_11B) && (pkt_type == DOT11_B)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11A) && (pkt_type == DOT11_N)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[mcs], 1,
((mcs < MAX_MCS_11A) && (pkt_type == DOT11_N)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[MAX_MCS], 1,
((mcs >= MAX_MCS_11AC) && (pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[mcs], 1,
((mcs < MAX_MCS_11AC) && (pkt_type == DOT11_AC)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[MAX_MCS], 1,
((mcs >= (MAX_MCS - 1)) && (pkt_type == DOT11_AX)));
DP_STATS_INCC(peer, tx.pkt_type[pkt_type].mcs_count[mcs], 1,
((mcs < (MAX_MCS - 1)) && (pkt_type == DOT11_AX)));
DP_STATS_INC(peer, tx.sgi_count[ts->sgi], 1); DP_STATS_INC(peer, tx.sgi_count[ts->sgi], 1);
DP_STATS_INC(peer, tx.bw[ts->bw], 1); DP_STATS_INC(peer, tx.bw[ts->bw], 1);
DP_STATS_UPD(peer, tx.last_ack_rssi, ts->ack_frame_rssi); DP_STATS_UPD(peer, tx.last_ack_rssi, ts->ack_frame_rssi);
DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ts->tid)], 1); DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ts->tid)], 1);
DP_STATS_INCC(peer, tx.stbc, 1, ts->stbc); DP_STATS_INCC(peer, tx.stbc, 1, ts->stbc);
DP_STATS_INCC(peer, tx.ofdma, 1, ts->ofdma);
DP_STATS_INCC(peer, tx.ldpc, 1, ts->ldpc); DP_STATS_INCC(peer, tx.ldpc, 1, ts->ldpc);
DP_STATS_INC_PKT(peer, tx.tx_success, 1, length); DP_STATS_INC_PKT(peer, tx.tx_success, 1, length);
DP_STATS_INCC(peer, tx.amsdu_cnt, 1, ts->msdu_part_of_amsdu);
DP_STATS_INCC(peer, tx.retries, 1, ts->transmit_cnt > 1); DP_STATS_INCC(peer, tx.retries, 1, ts->transmit_cnt > 1);
if (soc->cdp_soc.ol_ops->update_dp_stats) { if (soc->cdp_soc.ol_ops->update_dp_stats) {
@@ -2661,7 +2662,7 @@ QDF_STATUS dp_tx_soc_attach(struct dp_soc *soc)
* only for NPR EMU, should be removed, once NPR platforms * only for NPR EMU, should be removed, once NPR platforms
* are stable. * are stable.
*/ */
soc->process_tx_status = 1; soc->process_tx_status = 0;
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
"%s HAL Tx init Success\n", __func__); "%s HAL Tx init Success\n", __func__);

View File

@@ -742,7 +742,7 @@ struct dp_soc {
/* Enable processing of Tx completion status words */ /* Enable processing of Tx completion status words */
bool process_tx_status; bool process_tx_status;
bool process_rx_status;
struct dp_ast_entry *ast_table[WLAN_UMAC_PSOC_MAX_PEERS * 2]; struct dp_ast_entry *ast_table[WLAN_UMAC_PSOC_MAX_PEERS * 2];
struct { struct {
unsigned mask; unsigned mask;

View File

@@ -521,12 +521,24 @@ hal_rx_status_get_tlv_info(void *rx_tlv, struct hal_rx_ppdu_info *ppdu_info)
ppdu_info->rx_status.mcs = ppdu_info->rx_status.mcs =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1, HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
MCS); MCS);
ppdu_info->rx_status.tcp_msdu_count =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_9,
TCP_MSDU_COUNT);
ppdu_info->rx_status.udp_msdu_count =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_9,
UDP_MSDU_COUNT);
ppdu_info->rx_status.other_msdu_count =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_10,
OTHER_MSDU_COUNT);
ppdu_info->rx_status.nss = ppdu_info->rx_status.nss =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1, HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_1,
NSS); NSS);
ppdu_info->rx_status.first_data_seq_ctrl = ppdu_info->rx_status.first_data_seq_ctrl =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_3, HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_3,
DATA_SEQUENCE_CONTROL_INFO_VALID); DATA_SEQUENCE_CONTROL_INFO_VALID);
ppdu_info->rx_status.preamble_type =
HAL_RX_GET(rx_tlv, RX_PPDU_END_USER_STATS_3,
HT_CONTROL_FIELD_PKT_TYPE);
break; break;
} }
@@ -718,8 +730,6 @@ hal_rx_status_get_tlv_info(void *rx_tlv, struct hal_rx_ppdu_info *ppdu_info)
PHYRX_RSSI_LEGACY_35, RSSI_COMB); PHYRX_RSSI_LEGACY_35, RSSI_COMB);
ppdu_info->rx_status.bw = HAL_RX_GET(rssi_info_tlv, ppdu_info->rx_status.bw = HAL_RX_GET(rssi_info_tlv,
PHYRX_RSSI_LEGACY_35, RECEIVE_BANDWIDTH); PHYRX_RSSI_LEGACY_35, RECEIVE_BANDWIDTH);
ppdu_info->rx_status.preamble_type = HAL_RX_GET(rssi_info_tlv,
PHYRX_RSSI_LEGACY_0, RECEPTION_TYPE);
ppdu_info->rx_status.he_re = 0; ppdu_info->rx_status.he_re = 0;
value = HAL_RX_GET(rssi_info_tlv, value = HAL_RX_GET(rssi_info_tlv,

View File

@@ -179,6 +179,9 @@ struct mon_rx_status {
uint8_t nr_ant; uint8_t nr_ant;
uint8_t mcs; uint8_t mcs;
uint8_t nss; uint8_t nss;
uint16_t tcp_msdu_count;
uint16_t udp_msdu_count;
uint16_t other_msdu_count;
uint8_t bw; uint8_t bw;
uint8_t vht_flag_values1; uint8_t vht_flag_values1;
uint8_t vht_flag_values2; uint8_t vht_flag_values2;

View File

@@ -313,7 +313,7 @@ qdf_dentry_t qdf_debugfs_create_file(const char *name, uint16_t mode,
if (IS_ERR_OR_NULL(file)) { if (IS_ERR_OR_NULL(file)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"%s creation failed %p", name, file); "%s creation failed 0x%pK", name, file);
file = NULL; file = NULL;
} }