From 1bda6dc94f44cdf101b2babd9dbd1400b07cf549 Mon Sep 17 00:00:00 2001 From: Ruben Columbus Date: Thu, 23 Apr 2020 13:23:05 -0700 Subject: [PATCH] qcacmn: setting phy_mode to preambles value if peer delayed ba is true then value of preamble will be eventually overwritten by previous frame (HE) and would give wrong values when shown in pcap for radiotap fields. phy_mode is set to preamble value to hold it and later on set it to mpdu_info preamble. Change-Id: I054d27064b9ad151130fcbc1684594308352cef4 --- dp/wifi3.0/dp_htt.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index ddac2487b4f0..b69dc704839f 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -3029,6 +3029,39 @@ dp_process_ppdu_stats_user_compltn_flush_tlv(struct dp_pdev *pdev, dp_peer_unref_del_find_by_id(peer); } +/** + * dp_process_ppdu_stats_sch_cmd_status_tlv: Process schedule command status tlv + * Here we are not going to process the buffer. + * @pdev: DP PDEV handle + * @ppdu_info: per ppdu tlv structure + * + * return:void + */ +static void +dp_process_ppdu_stats_sch_cmd_status_tlv(struct dp_pdev *pdev, + struct ppdu_info *ppdu_info) +{ + struct cdp_tx_completion_ppdu *ppdu_desc; + uint8_t num_users; + uint8_t i; + + ppdu_desc = (struct cdp_tx_completion_ppdu *) + qdf_nbuf_data(ppdu_info->nbuf); + + num_users = ppdu_desc->num_users; + + if (ppdu_desc->frame_type == CDP_PPDU_FTYPE_BAR) { + for (i = 0; i < num_users; i++) { + if (ppdu_desc->user[i].user_pos == 0) { + /* update phy mode for bar frame */ + ppdu_desc->phy_mode = + ppdu_desc->user[i].preamble; + break; + } + } + } +} + #ifndef WLAN_TX_PKT_CAPTURE_ENH /* * dp_deliver_mgmt_frm: Process @@ -3255,6 +3288,9 @@ static void dp_process_ppdu_tag(struct dp_pdev *pdev, uint32_t *tag_buf, dp_process_ppdu_stats_user_compltn_flush_tlv(pdev, tlv_desc, ppdu_info); break; + case HTT_PPDU_STATS_SCH_CMD_STATUS_TLV: + dp_process_ppdu_stats_sch_cmd_status_tlv(pdev, ppdu_info); + break; default: break; }