ath11k: enable HE tlvs in ppdu stats for pktlog lite
authorAnilkumar Kolli <akolli@codeaurora.org>
Tue, 17 Dec 2019 16:21:40 +0000 (17:21 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 26 Jan 2020 10:38:07 +0000 (12:38 +0200)
This patch enables HE tlvs in ppdu stats for pktlog lite mode.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/debug.c
drivers/net/wireless/ath/ath11k/dp.h

index f48daf17f2d274c1cf0f15d7312335a3e78be269..8d485171b0b36df441635d7d20e91d0597919eb7 100644 (file)
@@ -931,7 +931,22 @@ static ssize_t ath11k_write_pktlog_filter(struct file *file,
                            HTT_RX_FILTER_TLV_FLAGS_PACKET_HEADER |
                            HTT_RX_FILTER_TLV_FLAGS_ATTENTION;
        } else if (mode == ATH11K_PKTLOG_MODE_LITE) {
+               ret = ath11k_dp_tx_htt_h2t_ppdu_stats_req(ar,
+                                                         HTT_PPDU_STATS_TAG_PKTLOG);
+               if (ret) {
+                       ath11k_err(ar->ab, "failed to enable pktlog lite: %d\n", ret);
+                       goto out;
+               }
+
                rx_filter = HTT_RX_FILTER_TLV_LITE_MODE;
+       } else {
+               ret = ath11k_dp_tx_htt_h2t_ppdu_stats_req(ar,
+                                                         HTT_PPDU_STATS_TAG_DEFAULT);
+               if (ret) {
+                       ath11k_err(ar->ab, "failed to send htt ppdu stats req: %d\n",
+                                  ret);
+                       goto out;
+               }
        }
 
        tlv_filter.rx_filter = rx_filter;
index 2f0980f2c762a671afc5c803d1572b579d145835..6ef5be4201b2c1ebae418a3a53c3e91af52c3e01 100644 (file)
@@ -507,6 +507,14 @@ enum htt_ppdu_stats_tag_type {
                                   | BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_FLUSH) \
                                   | BIT(HTT_PPDU_STATS_TAG_USR_COMMON_ARRAY))
 
+#define HTT_PPDU_STATS_TAG_PKTLOG  (BIT(HTT_PPDU_STATS_TAG_USR_MPDU_ENQ_BITMAP_64) | \
+                                   BIT(HTT_PPDU_STATS_TAG_USR_MPDU_ENQ_BITMAP_256) | \
+                                   BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_BA_BITMAP_64) | \
+                                   BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_BA_BITMAP_256) | \
+                                   BIT(HTT_PPDU_STATS_TAG_INFO) | \
+                                   BIT(HTT_PPDU_STATS_TAG_TX_MGMTCTRL_PAYLOAD) | \
+                                   HTT_PPDU_STATS_TAG_DEFAULT)
+
 /* HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG Message
  *
  * details: