Index: backports-20191227-4.4.60-b805aa84b44f/drivers/net/wireless/ath/ath11k/debug.c =================================================================== --- backports-20191227-4.4.60-b805aa84b44f.orig/drivers/net/wireless/ath/ath11k/debug.c +++ backports-20191227-4.4.60-b805aa84b44f/drivers/net/wireless/ath/ath11k/debug.c @@ -1129,6 +1129,8 @@ static ssize_t ath11k_debug_dump_soc_rin if (!buf) return -ENOMEM; + ath11k_hal_dump_srng_stats(ab); + len = ath11k_fill_bp_stats_buf(ab, buf, len, size); retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); @@ -1137,6 +1139,13 @@ static ssize_t ath11k_debug_dump_soc_rin return retval; } +static const struct file_operations fops_soc_ring_stats = { + .read = ath11k_debug_dump_soc_ring_stats, + .open = simple_open, + .owner = THIS_MODULE, + .llseek = default_llseek, +}; + static const struct file_operations fops_soc_dp_stats = { .read = ath11k_debug_dump_soc_dp_stats, .open = simple_open, @@ -1163,6 +1172,9 @@ int ath11k_debug_pdev_create(struct ath1 debugfs_create_file("soc_dp_stats", 0600, ab->debugfs_soc, ab, &fops_soc_dp_stats); + debugfs_create_file("soc_ring_stats", 0600, ab->debugfs_soc, ab, + &fops_soc_ring_stats); + return 0; } @@ -1172,13 +1184,6 @@ void ath11k_debug_pdev_destroy(struct at ab->debugfs_ath11k = NULL; } -static const struct file_operations fops_soc_ring_stats = { - .read = ath11k_debug_dump_soc_ring_stats, - .open = simple_open, - .owner = THIS_MODULE, - .llseek = default_llseek, -}; - int ath11k_debug_soc_create(struct ath11k_base *ab) { ab->debugfs_ath11k = debugfs_create_dir("ath11k", NULL); @@ -1189,8 +1194,6 @@ int ath11k_debug_soc_create(struct ath11 return -ENOMEM; } - debugfs_create_file("soc_ring_stats", 0600, ab->debugfs_soc, ab, - &fops_soc_ring_stats); return 0; }