From: Arnd Bergmann <arnd@arndb.de>
To: Kalle Valo <kvalo@codeaurora.org>,
Manikanta Pubbisetty <mpubbise@codeaurora.org>,
John Crispin <john@phrozen.org>,
Sven Eckelmann <seckelmann@datto.com>,
Bhagavathi Perumal S <bperumal@codeaurora.org>,
Anilkumar Kolli <akolli@codeaurora.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Ganesh Sesetti <gseset@codeaurora.org>,
Govindaraj Saminathan <gsamin@codeaurora.org>,
Julia Lawall <julia.lawall@lip6.fr>,
Karthikeyan Periyasamy <periyasa@codeaurora.org>,
kbuild test robot <lkp@intel.com>,
Maharaja Kennadyrajan <mkenna@codeaurora.org>,
Miles Hu <milehu@codeaurora.org>,
Muna Sinada <msinada@codeaurora.org>,
Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
Rajkumar Manoharan <rmanohar@codeaurora.org>,
Sathishkumar Muruganandam <murugana@codeaurora.org>,
Shashidhar Lakkavalli <slakkavalli@datto.com>,
Sriram R <srirrama@codeaurora.org>,
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>,
Venkateswara Naralasetty <vnaralas@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Tamizh chelvam <tamizhr@codeaurora.org>,
ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ath11k: fix debugfs build failure
Date: Tue, 7 Jan 2020 22:50:04 +0100 [thread overview]
Message-ID: <20200107215036.1333983-1-arnd@arndb.de> (raw)
When CONFIG_ATH11K_DEBUGFS is disabled, but CONFIG_MAC80211_DEBUGFS
is turned on, the driver fails to build:
drivers/net/wireless/ath/ath11k/debugfs_sta.c: In function 'ath11k_dbg_sta_open_htt_peer_stats':
drivers/net/wireless/ath/ath11k/debugfs_sta.c:416:4: error: 'struct ath11k' has no member named 'debug'
ar->debug.htt_stats.stats_req = stats_req;
^~
It appears that just using the former symbol is sufficient here,
adding a Kconfig dependency takes care of the corner cases.
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/ath/ath11k/Kconfig | 2 +-
drivers/net/wireless/ath/ath11k/Makefile | 3 +--
drivers/net/wireless/ath/ath11k/debug.h | 22 ++++++++++------------
drivers/net/wireless/ath/ath11k/mac.c | 2 +-
4 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/Kconfig b/drivers/net/wireless/ath/ath11k/Kconfig
index cfab4fb86aef..c88e16d4022b 100644
--- a/drivers/net/wireless/ath/ath11k/Kconfig
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
@@ -22,7 +22,7 @@ config ATH11K_DEBUG
config ATH11K_DEBUGFS
bool "QCA ath11k debugfs support"
- depends on ATH11K && DEBUG_FS
+ depends on ATH11K && DEBUG_FS && MAC80211_DEBUGFS
---help---
Enable ath11k debugfs support
diff --git a/drivers/net/wireless/ath/ath11k/Makefile b/drivers/net/wireless/ath/ath11k/Makefile
index a91d75c1cfeb..2761d07d938e 100644
--- a/drivers/net/wireless/ath/ath11k/Makefile
+++ b/drivers/net/wireless/ath/ath11k/Makefile
@@ -17,8 +17,7 @@ ath11k-y += core.o \
ce.o \
peer.o
-ath11k-$(CONFIG_ATH11K_DEBUGFS) += debug_htt_stats.o
-ath11k-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
+ath11k-$(CONFIG_ATH11K_DEBUGFS) += debug_htt_stats.o debugfs_sta.o
ath11k-$(CONFIG_NL80211_TESTMODE) += testmode.o
ath11k-$(CONFIG_ATH11K_TRACING) += trace.o
diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h
index a317a7bdb9a2..8e8d5588b541 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -172,6 +172,16 @@ static inline int ath11k_debug_is_extd_rx_stats_enabled(struct ath11k *ar)
{
return ar->debug.extd_rx_stats;
}
+
+void ath11k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta, struct dentry *dir);
+void
+ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta,
+ struct ath11k_per_peer_tx_stats *peer_stats,
+ u8 legacy_rate_idx);
+void ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar,
+ struct sk_buff *msdu,
+ struct hal_tx_status *ts);
#else
static inline int ath11k_debug_soc_create(struct ath11k_base *ab)
{
@@ -243,19 +253,7 @@ static inline bool ath11k_debug_is_pktlog_peer_valid(struct ath11k *ar, u8 *addr
{
return false;
}
-#endif /* CONFIG_ATH11K_DEBUGFS */
-#ifdef CONFIG_MAC80211_DEBUGFS
-void ath11k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta, struct dentry *dir);
-void
-ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta,
- struct ath11k_per_peer_tx_stats *peer_stats,
- u8 legacy_rate_idx);
-void ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar,
- struct sk_buff *msdu,
- struct hal_tx_status *ts);
-#else /* !CONFIG_MAC80211_DEBUGFS */
static inline void
ath11k_accumulate_per_peer_tx_stats(struct ath11k_sta *arsta,
struct ath11k_per_peer_tx_stats *peer_stats,
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 556eef9881a7..0ed3e4d19f7a 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -5468,7 +5468,7 @@ static const struct ieee80211_ops ath11k_ops = {
.flush = ath11k_mac_op_flush,
.sta_statistics = ath11k_mac_op_sta_statistics,
CFG80211_TESTMODE_CMD(ath11k_tm_cmd)
-#ifdef CONFIG_MAC80211_DEBUGFS
+#ifdef CONFIG_ATH11K_DEBUGFS
.sta_add_debugfs = ath11k_sta_add_debugfs,
#endif
};
--
2.20.0
next reply other threads:[~2020-01-07 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 21:50 Arnd Bergmann [this message]
2020-01-26 10:37 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200107215036.1333983-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akolli@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=bperumal@codeaurora.org \
--cc=davem@davemloft.net \
--cc=gsamin@codeaurora.org \
--cc=gseset@codeaurora.org \
--cc=john@phrozen.org \
--cc=julia.lawall@lip6.fr \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lkp@intel.com \
--cc=milehu@codeaurora.org \
--cc=mkenna@codeaurora.org \
--cc=mpubbise@codeaurora.org \
--cc=msinada@codeaurora.org \
--cc=murugana@codeaurora.org \
--cc=netdev@vger.kernel.org \
--cc=periyasa@codeaurora.org \
--cc=pradeepc@codeaurora.org \
--cc=rmanohar@codeaurora.org \
--cc=seckelmann@datto.com \
--cc=slakkavalli@datto.com \
--cc=srirrama@codeaurora.org \
--cc=tamizhr@codeaurora.org \
--cc=vnaralas@codeaurora.org \
--cc=vthiagar@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®