|
@@ -74,16 +74,28 @@ static void dp_tx_stats_update(struct dp_soc *soc, struct dp_peer *peer,
|
|
|
return;
|
|
|
|
|
|
DP_STATS_INC_PKT(peer, tx.comp_pkt,
|
|
|
- num_msdu, ppdu->success_bytes);
|
|
|
+ num_msdu, (ppdu->success_bytes +
|
|
|
+ ppdu->retry_bytes + ppdu->failed_bytes));
|
|
|
DP_STATS_INC(peer, tx.tx_failed, ppdu->failed_msdus);
|
|
|
- DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], 1);
|
|
|
- DP_STATS_INC(peer, tx.bw[ppdu->bw], 1);
|
|
|
+ DP_STATS_UPD(peer, tx.tx_rate, ppdu->tx_rate);
|
|
|
+ DP_STATS_INC(peer, tx.sgi_count[ppdu->gi], num_msdu);
|
|
|
+ DP_STATS_INC(peer, tx.bw[ppdu->bw], num_msdu);
|
|
|
DP_STATS_UPD(peer, tx.last_ack_rssi, ack_rssi);
|
|
|
- DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ppdu->tid)], 1);
|
|
|
- DP_STATS_INC(peer, tx.stbc, ppdu->stbc);
|
|
|
- DP_STATS_INC(peer, tx.ldpc, ppdu->ldpc);
|
|
|
+ DP_STATS_INC(peer, tx.wme_ac_type[TID_TO_WME_AC(ppdu->tid)], num_msdu);
|
|
|
+ DP_STATS_INCC(peer, tx.stbc, num_msdu, ppdu->stbc);
|
|
|
+ DP_STATS_INCC(peer, tx.ldpc, num_msdu, ppdu->ldpc);
|
|
|
DP_STATS_INC_PKT(peer, tx.tx_success, ppdu->success_msdus,
|
|
|
ppdu->success_bytes);
|
|
|
+ if (ppdu->is_mcast) {
|
|
|
+ DP_STATS_INC_PKT(peer, tx.mcast, num_msdu, (ppdu->success_bytes
|
|
|
+ + ppdu->retry_bytes +
|
|
|
+ ppdu->failed_bytes));
|
|
|
+ } else {
|
|
|
+ DP_STATS_INC_PKT(peer, tx.ucast, num_msdu, (ppdu->success_bytes
|
|
|
+ + ppdu->retry_bytes +
|
|
|
+ ppdu->failed_bytes));
|
|
|
+ }
|
|
|
+
|
|
|
DP_STATS_INC(peer, tx.retries,
|
|
|
(ppdu->long_retries + ppdu->short_retries));
|
|
|
DP_STATS_INCC(peer,
|
|
@@ -1381,9 +1393,13 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
|
|
else
|
|
|
ppdu_desc->frame_type = CDP_PPDU_FTYPE_CTRL;
|
|
|
|
|
|
- ppdu_desc->ppdu_start_timestamp = dp_stats_buf->ppdu_start_tstmp_us;
|
|
|
- ppdu_desc->ppdu_end_timestamp = dp_stats_buf->ppdu_sch_end_tstmp_us;
|
|
|
- tag_buf += 6;
|
|
|
+ tag_buf += 2;
|
|
|
+ ppdu_desc->tx_duration = *tag_buf;
|
|
|
+ tag_buf += 3;
|
|
|
+ ppdu_desc->ppdu_start_timestamp = *tag_buf;
|
|
|
+ ppdu_desc->ppdu_end_timestamp = 0; /*TODO: value to be provided by FW */
|
|
|
+ tag_buf++;
|
|
|
+
|
|
|
freq = HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_GET(*tag_buf);
|
|
|
if (freq != ppdu_desc->channel) {
|
|
|
soc = pdev->soc;
|
|
@@ -1392,6 +1408,7 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev,
|
|
|
pdev->operating_channel =
|
|
|
soc->cdp_soc.ol_ops->freq_to_channel(pdev->osif_pdev, freq);
|
|
|
}
|
|
|
+
|
|
|
ppdu_desc->phy_mode = HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_GET(*tag_buf);
|
|
|
}
|
|
|
|
|
@@ -1493,6 +1510,7 @@ static void dp_process_ppdu_stats_user_rate_tlv(struct dp_pdev *pdev,
|
|
|
HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_GET(*tag_buf);
|
|
|
|
|
|
tag_buf++;
|
|
|
+ ppdu_user_desc->tx_rate = *tag_buf;
|
|
|
|
|
|
ppdu_user_desc->ltf_size =
|
|
|
HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_GET(*tag_buf);
|
|
@@ -1656,6 +1674,8 @@ static void dp_process_ppdu_stats_user_cmpltn_common_tlv(
|
|
|
|
|
|
ppdu_user_desc->short_retries =
|
|
|
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_GET(*tag_buf);
|
|
|
+ ppdu_user_desc->retry_msdus =
|
|
|
+ ppdu_user_desc->long_retries + ppdu_user_desc->short_retries;
|
|
|
|
|
|
ppdu_user_desc->is_ampdu =
|
|
|
HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_GET(*tag_buf);
|
|
@@ -1786,6 +1806,12 @@ static void dp_process_ppdu_stats_user_compltn_ack_ba_status_tlv(
|
|
|
|
|
|
ppdu_user_desc->num_msdu =
|
|
|
HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_GET(*tag_buf);
|
|
|
+
|
|
|
+ ppdu_user_desc->success_msdus = ppdu_user_desc->num_msdu;
|
|
|
+
|
|
|
+ tag_buf += 2;
|
|
|
+ ppdu_user_desc->success_bytes = *tag_buf;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -1809,9 +1835,9 @@ static void dp_process_ppdu_stats_user_common_array_tlv(struct dp_pdev *pdev,
|
|
|
ppdu_desc =
|
|
|
(struct cdp_tx_completion_ppdu *)qdf_nbuf_data(pdev->tx_ppdu_info.buf);
|
|
|
|
|
|
- tag_buf += 2;
|
|
|
+ tag_buf++;
|
|
|
dp_stats_buf = (struct htt_tx_ppdu_stats_info *)tag_buf;
|
|
|
- tag_buf += 4;
|
|
|
+ tag_buf += 3;
|
|
|
peer_id =
|
|
|
HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_GET(*tag_buf);
|
|
|
|
|
@@ -1827,11 +1853,11 @@ static void dp_process_ppdu_stats_user_common_array_tlv(struct dp_pdev *pdev,
|
|
|
|
|
|
ppdu_user_desc = &ppdu_desc->user[curr_user_index];
|
|
|
|
|
|
- ppdu_user_desc->success_bytes = dp_stats_buf->tx_success_bytes;
|
|
|
ppdu_user_desc->retry_bytes = dp_stats_buf->tx_retry_bytes;
|
|
|
ppdu_user_desc->failed_bytes = dp_stats_buf->tx_failed_bytes;
|
|
|
|
|
|
tag_buf++;
|
|
|
+
|
|
|
ppdu_user_desc->success_msdus =
|
|
|
HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_GET(*tag_buf);
|
|
|
ppdu_user_desc->retry_bytes =
|
|
@@ -1839,8 +1865,45 @@ static void dp_process_ppdu_stats_user_common_array_tlv(struct dp_pdev *pdev,
|
|
|
tag_buf++;
|
|
|
ppdu_user_desc->failed_msdus =
|
|
|
HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_GET(*tag_buf);
|
|
|
- ppdu_user_desc->tx_duration =
|
|
|
- HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_GET(*tag_buf);
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * dp_process_ppdu_stats_flush_tlv: Process
|
|
|
+ * htt_ppdu_stats_flush_tlv
|
|
|
+ * @pdev: DP PDEV handle
|
|
|
+ * @tag_buf: buffer containing the htt_ppdu_stats_flush_tlv
|
|
|
+ *
|
|
|
+ * return:void
|
|
|
+ */
|
|
|
+static void dp_process_ppdu_stats_user_compltn_flush_tlv(struct dp_pdev *pdev,
|
|
|
+ uint32_t *tag_buf)
|
|
|
+{
|
|
|
+ uint32_t peer_id;
|
|
|
+ uint32_t drop_reason;
|
|
|
+ uint8_t tid;
|
|
|
+ uint32_t num_msdu;
|
|
|
+ struct dp_peer *peer;
|
|
|
+
|
|
|
+ tag_buf++;
|
|
|
+ drop_reason = *tag_buf;
|
|
|
+
|
|
|
+ tag_buf++;
|
|
|
+ num_msdu = HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_GET(*tag_buf);
|
|
|
+
|
|
|
+ tag_buf++;
|
|
|
+ peer_id =
|
|
|
+ HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_GET(*tag_buf);
|
|
|
+
|
|
|
+ peer = dp_peer_find_by_id(pdev->soc, peer_id);
|
|
|
+ if (!peer)
|
|
|
+ return;
|
|
|
+
|
|
|
+ tid = HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_GET(*tag_buf);
|
|
|
+
|
|
|
+ if (drop_reason == HTT_FLUSH_EXCESS_RETRIES) {
|
|
|
+ DP_STATS_INC(peer, tx.excess_retries[TID_TO_WME_AC(tid)],
|
|
|
+ num_msdu);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -1890,7 +1953,6 @@ static void dp_process_ppdu_tag(struct dp_pdev *pdev, uint32_t *tag_buf,
|
|
|
uint32_t tlv_len)
|
|
|
{
|
|
|
uint32_t tlv_type = HTT_STATS_TLV_TAG_GET(*tag_buf);
|
|
|
-
|
|
|
switch (tlv_type) {
|
|
|
case HTT_PPDU_STATS_COMMON_TLV:
|
|
|
dp_process_ppdu_stats_common_tlv(pdev, tag_buf);
|
|
@@ -1928,6 +1990,10 @@ static void dp_process_ppdu_tag(struct dp_pdev *pdev, uint32_t *tag_buf,
|
|
|
dp_process_ppdu_stats_user_common_array_tlv(pdev,
|
|
|
tag_buf);
|
|
|
break;
|
|
|
+ case HTT_PPDU_STATS_USR_COMPLTN_FLUSH_TLV:
|
|
|
+ dp_process_ppdu_stats_user_compltn_flush_tlv(pdev,
|
|
|
+ tag_buf);
|
|
|
+ break;
|
|
|
case HTT_PPDU_STATS_TX_MGMTCTRL_PAYLOAD_TLV:
|
|
|
dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv(pdev,
|
|
|
tag_buf, tlv_len);
|
|
@@ -1955,16 +2021,11 @@ static QDF_STATUS dp_htt_process_tlv(struct dp_pdev *pdev,
|
|
|
ppdu_id = HTT_T2H_PPDU_STATS_PPDU_ID_GET(*msg_word);
|
|
|
|
|
|
msg_word = msg_word + 3;
|
|
|
-
|
|
|
while (length > 0) {
|
|
|
tlv_buf = (uint8_t *)msg_word;
|
|
|
tlv_type = HTT_STATS_TLV_TAG_GET(*msg_word);
|
|
|
tlv_length = HTT_STATS_TLV_LENGTH_GET(*msg_word);
|
|
|
|
|
|
- QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
|
|
|
- "HTT PPDU Tag %d, Length %d", tlv_type,
|
|
|
- tlv_length);
|
|
|
-
|
|
|
if (tlv_length == 0)
|
|
|
break;
|
|
|
|
|
@@ -1974,10 +2035,10 @@ static QDF_STATUS dp_htt_process_tlv(struct dp_pdev *pdev,
|
|
|
tlv_length += HTT_TLV_HDR_LEN;
|
|
|
dp_process_ppdu_tag(pdev, msg_word, tlv_length);
|
|
|
|
|
|
+
|
|
|
msg_word = (uint32_t *)((uint8_t *)tlv_buf + tlv_length);
|
|
|
length -= (tlv_length);
|
|
|
}
|
|
|
-
|
|
|
return status;
|
|
|
}
|
|
|
#endif /* FEATURE_PERPKT_INFO */
|