diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 8af78a3a772a..91e0caf6af0f 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -1023,6 +1023,7 @@ struct cdp_tx_completion_msdu { * UL_BSR_TRIG/UNKNOWN * @rssi: RSSI value (units = dB above noise floor) * @timestamp: TSF at the reception of PPDU + * @length: PPDU length * @channel: Channel informartion * @lsig_A: L-SIG in 802.11 PHY header */ @@ -1060,6 +1061,7 @@ struct cdp_rx_indication_ppdu { uint32_t lsig_a; uint32_t rssi; uint64_t timestamp; + uint32_t length; uint8_t channel; }; diff --git a/dp/wifi3.0/dp_rx_mon_dest.c b/dp/wifi3.0/dp_rx_mon_dest.c index c620f2a6bfc3..26fbd421e585 100644 --- a/dp/wifi3.0/dp_rx_mon_dest.c +++ b/dp/wifi3.0/dp_rx_mon_dest.c @@ -139,11 +139,13 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id, void *p_last_buf_addr_info; uint32_t rx_bufs_used = 0; uint32_t msdu_ppdu_id, msdu_cnt, last_ppdu_id; + uint32_t msdu_len; uint8_t *data; uint32_t i; uint32_t total_frag_len = 0, frag_len = 0; bool is_frag, is_first_msdu; + msdu_len = 0; msdu = 0; last_ppdu_id = dp_pdev->ppdu_info.com_info.last_ppdu_id; @@ -237,6 +239,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id, "%s total_len %u frag_len %u flags %u", __func__, total_frag_len, frag_len, msdu_list.msdu_info[i].msdu_flags); + msdu_len += frag_len; rx_pkt_offset = HAL_RX_MON_HW_RX_DESC_SIZE(); /* @@ -308,6 +311,8 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id, *tail_msdu = msdu; + dp_pdev->ppdu_info.rx_status.ppdu_len += msdu_len; + return rx_bufs_used; } @@ -749,8 +754,6 @@ void dp_rx_mon_dest_process(struct dp_soc *soc, uint32_t mac_id, uint32_t quota) if (ppdu_id != pdev->ppdu_info.com_info.ppdu_id) { pdev->mon_ppdu_status = DP_PPDU_STATUS_START; - qdf_mem_zero(&(pdev->ppdu_info.rx_status), - sizeof(pdev->ppdu_info.rx_status)); pdev->ppdu_info.com_info.last_ppdu_id = pdev->ppdu_info.com_info.ppdu_id; QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, @@ -765,6 +768,7 @@ void dp_rx_mon_dest_process(struct dp_soc *soc, uint32_t mac_id, uint32_t quota) rxdma_dst_ring_desc = hal_srng_dst_get_next(hal_soc, mon_dst_srng); } + hal_srng_access_end(hal_soc, mon_dst_srng); if (rx_bufs_used) { diff --git a/dp/wifi3.0/dp_rx_mon_status.c b/dp/wifi3.0/dp_rx_mon_status.c index 68fad1a3a254..818b1447a397 100644 --- a/dp/wifi3.0/dp_rx_mon_status.c +++ b/dp/wifi3.0/dp_rx_mon_status.c @@ -72,6 +72,7 @@ dp_rx_populate_cdp_indication_ppdu(struct dp_soc *soc, 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->tcp_msdu_count = ppdu_info->rx_status.tcp_msdu_count; @@ -263,7 +264,6 @@ dp_rx_handle_ppdu_stats(struct dp_soc *soc, struct dp_pdev *pdev, * Do not allocate if fcs error, * ast idx invalid / fctl invalid */ - if (!ppdu_info->rx_status.frame_control_info_valid) return; @@ -359,15 +359,18 @@ dp_rx_mon_status_process_tlv(struct dp_soc *soc, uint32_t mac_id, } if (tlv_status == HAL_TLV_STATUS_PPDU_DONE) { + pdev->mon_ppdu_status = DP_PPDU_STATUS_DONE; + dp_rx_mon_dest_process(soc, mac_id, quota); if (pdev->enhanced_stats_en || pdev->mcopy_mode) dp_rx_handle_ppdu_stats(soc, pdev, ppdu_info); - pdev->mon_ppdu_status = DP_PPDU_STATUS_DONE; - dp_rx_mon_dest_process(soc, mac_id, quota); pdev->mon_ppdu_status = DP_PPDU_STATUS_START; pdev->ppdu_info.com_info.last_ppdu_id = pdev->ppdu_info.com_info.ppdu_id; + + qdf_mem_zero(&(pdev->ppdu_info.rx_status), + sizeof(pdev->ppdu_info.rx_status)); } } return; diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h index 230c3d1f1ba5..dc3325bf703a 100644 --- a/qdf/inc/qdf_nbuf.h +++ b/qdf/inc/qdf_nbuf.h @@ -253,6 +253,7 @@ struct mon_rx_status { uint16_t he_data4; uint16_t he_data5; uint16_t he_data6; + uint32_t ppdu_len; }; /* Masks for HE SIG known fields in mon_rx_status structure */