mirror of
https://github.com/breeze303/openwrt-ipq.git
synced 2025-12-16 21:51:07 +00:00
199 lines
6.3 KiB
Diff
199 lines
6.3 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
|
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
|
@@ -80,6 +80,24 @@ config ATH11K_DEBUGFS
|
|
|
|
If unsure, say Y to make it easier to debug problems.
|
|
|
|
+config ATH11K_DEBUGFS_STA
|
|
+ bool "QCA ath11k debugfs STA support"
|
|
+ depends on ATH11K_DEBUGFS
|
|
+ default n
|
|
+ help
|
|
+ Enable ath11k debugfs STA support
|
|
+
|
|
+ If unsure, say Y to make it easier to debug problems.
|
|
+
|
|
+config ATH11K_DEBUGFS_HTT_STATS
|
|
+ bool "QCA ath11k debugfs HTT stats support"
|
|
+ depends on ATH11K_DEBUGFS
|
|
+ default n
|
|
+ help
|
|
+ Enable ath11k debugfs HTT stats support
|
|
+
|
|
+ If unsure, say Y to make it easier to debug problems.
|
|
+
|
|
config ATH11K_TRACING
|
|
bool "ath11k tracing support"
|
|
depends on ATH11K && EVENT_TRACING
|
|
--- a/drivers/net/wireless/ath/ath11k/Makefile
|
|
+++ b/drivers/net/wireless/ath/ath11k/Makefile
|
|
@@ -19,7 +19,9 @@ ath11k-y += core.o \
|
|
hw.o \
|
|
pcic.o
|
|
|
|
-ath11k-$(CPTCFG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
|
|
+ath11k-$(CPTCFG_ATH11K_DEBUGFS) += debugfs.o
|
|
+ath11k-$(CPTCFG_ATH11K_DEBUGFS_STA) += debugfs_sta.o
|
|
+ath11k-$(CPTCFG_ATH11K_DEBUGFS_HTT_STATS) += debugfs_htt_stats.o
|
|
ath11k-$(CPTCFG_NL80211_TESTMODE) += testmode.o
|
|
ath11k-$(CPTCFG_ATH11K_TRACING) += trace.o
|
|
ath11k-$(CPTCFG_ATH11K_THERMAL) += thermal.o
|
|
--- a/drivers/net/wireless/ath/ath11k/debugfs.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/debugfs.c
|
|
@@ -1875,7 +1875,9 @@ int ath11k_debugfs_register(struct ath11
|
|
snprintf(buf, 100, "../../ath11k/%pd2", ar->debug.debugfs_pdev);
|
|
debugfs_create_symlink("ath11k", ar->hw->wiphy->debugfsdir, buf);
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
ath11k_debugfs_htt_stats_init(ar);
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
ath11k_debugfs_fw_stats_init(ar);
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/debugfs_sta.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/debugfs_sta.c
|
|
@@ -11,7 +11,9 @@
|
|
#include "debug.h"
|
|
#include "dp_tx.h"
|
|
#include "dp_rx.h"
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
#include "debugfs_htt_stats.h"
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
static inline u32 ath11k_he_tones_in_ru_to_nl80211_he_ru_alloc(u16 ru_tones)
|
|
{
|
|
@@ -551,6 +553,7 @@ static const struct file_operations fops
|
|
.llseek = default_llseek,
|
|
};
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
static int
|
|
ath11k_dbg_sta_open_htt_peer_stats(struct inode *inode, struct file *file)
|
|
{
|
|
@@ -622,6 +625,7 @@ static const struct file_operations fops
|
|
.owner = THIS_MODULE,
|
|
.llseek = default_llseek,
|
|
};
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
static ssize_t ath11k_dbg_sta_write_peer_pktlog(struct file *file,
|
|
const char __user *buf,
|
|
@@ -906,6 +910,7 @@ static const struct file_operations fops
|
|
.llseek = default_llseek,
|
|
};
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
static ssize_t
|
|
ath11k_write_htt_peer_stats_reset(struct file *file,
|
|
const char __user *user_buf,
|
|
@@ -965,6 +970,7 @@ static const struct file_operations fops
|
|
.owner = THIS_MODULE,
|
|
.llseek = default_llseek,
|
|
};
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
static ssize_t ath11k_dbg_sta_read_peer_ps_state(struct file *file,
|
|
char __user *user_buf,
|
|
@@ -1111,8 +1117,10 @@ void ath11k_debugfs_sta_op_add(struct ie
|
|
&fops_reset_rx_stats);
|
|
}
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
debugfs_create_file("htt_peer_stats", 0400, dir, sta,
|
|
&fops_htt_peer_stats);
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
debugfs_create_file("peer_pktlog", 0644, dir, sta,
|
|
&fops_peer_pktlog);
|
|
@@ -1122,10 +1130,12 @@ void ath11k_debugfs_sta_op_add(struct ie
|
|
debugfs_create_file("addba_resp", 0200, dir, sta, &fops_addba_resp);
|
|
debugfs_create_file("delba", 0200, dir, sta, &fops_delba);
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
if (test_bit(WMI_TLV_SERVICE_PER_PEER_HTT_STATS_RESET,
|
|
ar->ab->wmi_ab.svc_map))
|
|
debugfs_create_file("htt_peer_stats_reset", 0600, dir, sta,
|
|
&fops_htt_peer_stats_reset);
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
|
|
debugfs_create_file("peer_ps_state", 0400, dir, sta,
|
|
&fops_peer_ps_state);
|
|
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
@@ -1723,8 +1723,10 @@ ath11k_update_per_peer_tx_stats(struct a
|
|
peer_stats->mu_pos = mu_pos;
|
|
peer_stats->ru_tones = arsta->txrate.he_ru_alloc;
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_STA
|
|
if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
|
|
ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
|
|
+#endif
|
|
}
|
|
|
|
usr_stats->rate_stats_updated = true;
|
|
@@ -2170,7 +2172,9 @@ void ath11k_dp_htt_htc_t2h_msg_handler(s
|
|
ath11k_htt_pull_ppdu_stats(ab, skb);
|
|
break;
|
|
case HTT_T2H_MSG_TYPE_EXT_STATS_CONF:
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_HTT_STATS
|
|
ath11k_debugfs_htt_ext_stats_handler(ab, skb);
|
|
+#endif /* CPTCFG_ATH11K_DEBUGFS_HTT_STATS */
|
|
break;
|
|
case HTT_T2H_MSG_TYPE_PKTLOG:
|
|
ath11k_htt_pktlog(ab, skb);
|
|
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
|
@@ -7,7 +7,9 @@
|
|
#include "core.h"
|
|
#include "dp_tx.h"
|
|
#include "debug.h"
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_STA
|
|
#include "debugfs_sta.h"
|
|
+#endif
|
|
#include "hw.h"
|
|
#include "peer.h"
|
|
#include "mac.h"
|
|
@@ -550,7 +552,9 @@ static void ath11k_dp_tx_cache_peer_stat
|
|
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
|
|
{
|
|
struct ath11k_base *ab = ar->ab;
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_STA
|
|
struct ath11k_per_peer_tx_stats *peer_stats = &ar->cached_stats;
|
|
+#endif
|
|
enum hal_tx_rate_stats_pkt_type pkt_type;
|
|
enum hal_tx_rate_stats_sgi sgi;
|
|
enum hal_tx_rate_stats_bw bw;
|
|
@@ -639,8 +643,10 @@ void ath11k_dp_tx_update_txcompl(struct
|
|
ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(ru_tones);
|
|
}
|
|
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_STA
|
|
if (ath11k_debugfs_is_extd_tx_stats_enabled(ar))
|
|
ath11k_debugfs_sta_add_tx_stats(arsta, peer_stats, rate_idx);
|
|
+#endif
|
|
|
|
err_out:
|
|
spin_unlock_bh(&ab->base_lock);
|
|
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
@@ -9811,7 +9811,7 @@ static const struct ieee80211_ops ath11k
|
|
.set_wakeup = ath11k_wow_op_set_wakeup,
|
|
#endif
|
|
|
|
-#ifdef CPTCFG_ATH11K_DEBUGFS
|
|
+#ifdef CPTCFG_ATH11K_DEBUGFS_STA
|
|
.sta_add_debugfs = ath11k_debugfs_sta_op_add,
|
|
#endif
|
|
|
|
--- a/local-symbols
|
|
+++ b/local-symbols
|
|
@@ -176,6 +176,8 @@ ATH11K_MEM_PROFILE_256M=
|
|
ATH11K_MEM_PROFILE_512M=
|
|
ATH11K_DEBUG=
|
|
ATH11K_DEBUGFS=
|
|
+ATH11K_DEBUGFS_STA=
|
|
+ATH11K_DEBUGFS_HTT_STATS=
|
|
ATH11K_TRACING=
|
|
ATH11K_SPECTRAL=
|
|
ATH11K_THERMAL=
|