From be9d5fcc146135422ebf4a0a3b31d39bab395758 Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Thu, 26 Jul 2018 19:21:24 +0530 Subject: [PATCH] qcacmn: populate delayed_ba bit to tx PPDU descriptor Populate delayed_ba bit to the user info in tx PPDU descriptor from htt user common tlv Change-Id: I7d22b10123015cd3799e1c3b2f31c7da6f020c13 --- dp/inc/cdp_txrx_cmn_struct.h | 6 +++++- dp/wifi3.0/dp_htt.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index cdc6830da0ff..9cdac66e0691 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -206,10 +206,12 @@ enum cdp_host_txrx_stats { * cdp_ppdu_ftype: PPDU Frame Type * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames + * @CDP_PPDU_FTYPE_BAR: SU or MU BAR frames */ enum cdp_ppdu_ftype { CDP_PPDU_FTYPE_CTRL, CDP_PPDU_FTYPE_DATA, + CDP_PPDU_FTYPE_BAR, CDP_PPDU_FTYPE_MAX }; @@ -924,6 +926,7 @@ struct cdp_tx_sojourn_stats { * @gi: guard interval 800/400/1600/3200 ns * @dcm: dcm * @ldpc: ldpc + * @delayed_ba: delayed ba bit * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ * UL_BSR_TRIG/UNKNOWN * @ba_seq_no: Block Ack sequence number @@ -966,7 +969,8 @@ struct cdp_tx_completion_ppdu_user { preamble:4, gi:4, dcm:1, - ldpc:1; + ldpc:1, + delayed_ba:1; uint32_t ba_seq_no; uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; uint32_t start_seq; diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 8e76098a45ec..f3c96b4aa435 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -1671,6 +1671,9 @@ static void dp_process_ppdu_stats_common_tlv(struct dp_pdev *pdev, 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 if ((frame_type == HTT_STATS_FTYPE_SGEN_MU_BAR) || + (frame_type == HTT_STATS_FTYPE_SGEN_BAR)) + ppdu_desc->frame_type = CDP_PPDU_FTYPE_BAR; else ppdu_desc->frame_type = CDP_PPDU_FTYPE_CTRL; @@ -1731,6 +1734,10 @@ static void dp_process_ppdu_stats_user_common_tlv( tag_buf++; + if (HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_GET(*tag_buf)) { + ppdu_user_desc->delayed_ba = 1; + } + if (HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_GET(*tag_buf)) { ppdu_user_desc->is_mcast = true; ppdu_user_desc->mpdu_tried_mcast = @@ -1748,6 +1755,12 @@ static void dp_process_ppdu_stats_user_common_tlv( ppdu_user_desc->frame_ctrl = HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_GET(*tag_buf); ppdu_desc->frame_ctrl = ppdu_user_desc->frame_ctrl; + + if (ppdu_user_desc->delayed_ba) { + ppdu_user_desc->mpdu_success = 0; + ppdu_user_desc->mpdu_tried_mcast = 0; + ppdu_user_desc->mpdu_tried_ucast = 0; + } }