wlan-ap-Telecominfraproject/feeds/ipq807x/mac80211/patches/181-ath11k-remove-error-on-soc-debugfs-fail.patch
John Crispin 3affbc1cad QualComm/AX: add Hawkeye and Cypress support
This series is based on
* 2020-07-10 ipq6018-ilq-11-0_qca_oem-034672b0676c37b1f4519e5720e18e95fe6236ef

Add support for
* qsdk kernel/v4.4
* qsdk ethernet subsystem
* v5.7 ath11k backport + QualComm staging patches (wlan_ap_1.0)
* ath11k-firmware
* hostapd/iw/...

Feature support
* full boot, system detection
* sysupgrade to nand
* HE support via latest hostapd
* driver support for usb, crypto, hwmon, cpufreq, ...

Missing
* NSS/HW flow offloading - FW blob is not redistributable

Using the qsdk v4.4 is an intermediate solution while the vanilla is being
tested. Vanilla kernel is almost on feature par. Work has already started
to upstream the ethernet and switch drivers. Once complete the target will
be fully upstream.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-23 18:54:03 +02:00

104 lines
3.1 KiB
Diff

From 0a9fbc6b07ce608e4a18aafa58397a6cd09ddea3 Mon Sep 17 00:00:00 2001
From: Anilkumar Kolli <akolli@codeaurora.org>
Date: Fri, 15 May 2020 14:51:50 +0530
Subject: [PATCH 181/187] ath11k: add support to multiple debugfs entries for
qcn9000
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/core.c | 5 +----
drivers/net/wireless/ath/ath11k/core.h | 1 -
drivers/net/wireless/ath/ath11k/debug.c | 22 ++++++++++++----------
3 files changed, 13 insertions(+), 15 deletions(-)
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -426,7 +426,7 @@ static int ath11k_core_pdev_create(struc
ret = ath11k_mac_register(ab);
if (ret) {
ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret);
- goto err_pdev_debug;
+ return ret;
}
ret = ath11k_dp_pdev_alloc(ab);
@@ -456,8 +456,6 @@ err_dp_pdev_free:
ath11k_dp_pdev_free(ab);
err_mac_unregister:
ath11k_mac_unregister(ab);
-err_pdev_debug:
- ath11k_debug_pdev_destroy(ab);
return ret;
}
@@ -469,7 +467,6 @@ static void ath11k_core_pdev_destroy(str
ath11k_mac_unregister(ab);
ath11k_hif_irq_disable(ab);
ath11k_dp_pdev_free(ab);
- ath11k_debug_pdev_destroy(ab);
}
static int ath11k_core_start(struct ath11k_base *ab,
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -792,7 +792,6 @@ struct ath11k_base {
enum ath11k_dfs_region dfs_region;
#ifdef CPTCFG_ATH11K_DEBUGFS
struct dentry *debugfs_soc;
- struct dentry *debugfs_ath11k;
struct ath11k_soc_dp_ring_stats ring_stats;
#endif
struct ath11k_soc_dp_stats soc_stats;
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -13,6 +13,8 @@
#include "peer.h"
#include "pktlog.h"
+struct dentry *debugfs_ath11k;
+
#ifdef CPTCFG_ATH11K_DEBUGFS
static const char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = {
"REO2SW1_RING",
@@ -1159,10 +1161,15 @@ static const struct file_operations fops
int ath11k_debug_pdev_create(struct ath11k_base *ab)
{
+ char soc_name[11] = {0};
+
if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags))
return 0;
- ab->debugfs_soc = debugfs_create_dir(ab->hw_params.name, ab->debugfs_ath11k);
+ snprintf(soc_name, sizeof(soc_name), "%s_%d", ab->hw_params.name,
+ ab->qmi.service_ins_id);
+
+ ab->debugfs_soc = debugfs_create_dir(soc_name, debugfs_ath11k);
if (IS_ERR_OR_NULL(ab->debugfs_soc)) {
if (IS_ERR(ab->debugfs_soc))
@@ -1184,19 +1191,14 @@ int ath11k_debug_pdev_create(struct ath1
void ath11k_debug_pdev_destroy(struct ath11k_base *ab)
{
- debugfs_remove_recursive(ab->debugfs_ath11k);
- ab->debugfs_ath11k = NULL;
+ debugfs_remove_recursive(debugfs_ath11k);
+ debugfs_ath11k = NULL;
}
int ath11k_debug_soc_create(struct ath11k_base *ab)
{
- ab->debugfs_ath11k = debugfs_create_dir("ath11k", NULL);
-
- if (IS_ERR_OR_NULL(ab->debugfs_ath11k)) {
- if (IS_ERR(ab->debugfs_ath11k))
- return PTR_ERR(ab->debugfs_ath11k);
- return -ENOMEM;
- }
+ if (IS_ERR_OR_NULL(debugfs_ath11k))
+ debugfs_ath11k = debugfs_create_dir("ath11k", NULL);
return 0;
}