OSDN Git Service

ath10k: enabling tx stats support over pktlog
authorBalaji Pothunoori <bpothuno@codeaurora.org>
Mon, 13 May 2019 14:53:07 +0000 (20:23 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 25 Jun 2019 12:56:13 +0000 (15:56 +0300)
For QCA988X target, pktlog gives details of the tx bitrate
which is used in the driver for station info.

Enabling pktlog by default will cause more interrupts
in target to host CE pipe, which can impact more CPU usage
for targets ex:WCN3990 and also not required for all other
platforms (eg: WCN3990), for getting tx bitrate.

Enable pktlog only for QCA988X based on hardware params.

Tested HW : WCN3990
Tested FW : WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1

Fixes: e8123bb74c4e ("ath10k: add per peer tx stats support for 10.2.4")
Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/hw.h
drivers/net/wireless/ath/ath10k/mac.c

index 770ddc7..43ed616 100644 (file)
@@ -85,6 +85,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = true,
        },
        {
                .id = QCA988X_HW_2_0_VERSION,
@@ -119,6 +120,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = true,
        },
        {
                .id = QCA9887_HW_1_0_VERSION,
@@ -154,6 +156,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA6174_HW_3_2_VERSION,
@@ -181,6 +184,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .ast_skid_limit = 0x10,
                .num_wds_entries = 0x20,
                .uart_pin_workaround = true,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA6174_HW_2_1_VERSION,
@@ -215,6 +219,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA6174_HW_2_1_VERSION,
@@ -249,6 +254,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA6174_HW_3_0_VERSION,
@@ -283,6 +289,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA6174_HW_3_2_VERSION,
@@ -320,6 +327,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = true,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -360,6 +368,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA9984_HW_1_0_DEV_VERSION,
@@ -407,6 +416,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA9888_HW_2_0_DEV_VERSION,
@@ -451,6 +461,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA9377_HW_1_0_DEV_VERSION,
@@ -485,6 +496,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA9377_HW_1_1_DEV_VERSION,
@@ -521,6 +533,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = true,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = QCA4019_HW_1_0_DEV_VERSION,
@@ -562,6 +575,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = false,
                .hw_filter_reset_required = true,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
        {
                .id = WCN3990_HW_1_0_DEV_VERSION,
@@ -589,6 +603,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                .rri_on_ddr = true,
                .hw_filter_reset_required = false,
                .fw_diag_ce_download = false,
+               .tx_stats_over_pktlog = false,
        },
 };
 
index cdc9b4a..57381f8 100644 (file)
@@ -614,6 +614,9 @@ struct ath10k_hw_params {
         * firmware bug
         */
        bool uart_pin_workaround;
+
+       /* tx stats support over pktlog */
+       bool tx_stats_over_pktlog;
 };
 
 struct htt_rx_desc;
index b500fd4..40e7cea 100644 (file)
@@ -7877,7 +7877,8 @@ ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
                                    arvif->vdev_id, ret);
        }
 
-       if (ath10k_peer_stats_enabled(ar)) {
+       if (ath10k_peer_stats_enabled(ar) &&
+           ar->hw_params.tx_stats_over_pktlog) {
                ar->pktlog_filter |= ATH10K_PKTLOG_PEER_STATS;
                ret = ath10k_wmi_pdev_pktlog_enable(ar,
                                                    ar->pktlog_filter);