From patchwork Tue Jan 7 21:50:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11321919 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C39614B4 for ; Tue, 7 Jan 2020 21:51:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76AFB206DB for ; Tue, 7 Jan 2020 21:51:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Nj9DFi6r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76AFB206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GvnqTCs3DfGG2bs+rLjcvtFrkFOSR8GpCxMfZjuFsfg=; b=Nj9DFi6rBXZ9aV FQNz2JUS+hFBc/A+Orggis+1Jy8EH3v54mUtYDkOpA0DHkJzymMYZVpXwV4H1MqZQhhkhicRWL96Z TckFTlwWlzBlRgftp9ElMFl3QSUM1RFmcPUEWg6Dp3TUo4FngawtbmmES+j3ZgQHDebuAzJvzYmTT YHbiyW2GZtobL4ekKitgN0i8WRULjdfahIQ/doh7BG5NDpZD6VuT1Cas907AQAlDL3Nbjd/Jrmx1z BX/UuGY5qW6ne1/JirAu8s008/WR9jv9gWYhN9LJZkkyDFHmPadExXC35OcP1vamK/KFfx/c8UJEj bGTymUYcSdTRvfH8PGyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iowkn-00083a-QU; Tue, 07 Jan 2020 21:51:09 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iowkk-000830-JN for ath11k@lists.infradead.org; Tue, 07 Jan 2020 21:51:08 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MJmbB-1j8wTR45Dl-00K4yP; Tue, 07 Jan 2020 22:50:41 +0100 From: Arnd Bergmann To: Kalle Valo , Manikanta Pubbisetty , John Crispin , Sven Eckelmann , Bhagavathi Perumal S , Anilkumar Kolli Subject: [PATCH] ath11k: fix debugfs build failure Date: Tue, 7 Jan 2020 22:50:04 +0100 Message-Id: <20200107215036.1333983-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:1IwwBGhuOz0cd0fMgrQmU/t4gEgEbaY4kf54G9AmPByhjQQY7fh QQff/ZJNDnmGx924TaQblUyv7rp3cQfsvSoH8yH7/yXdJR1ISoA/dR7lC8paPX8lGQAcWWZ LHqBUDplT7XEGiO3wen35XFc1XN3SwaDPM9McT45/lQhibx/jMp5gZS6lq/Clz9Kv40V0ad 42xWSqOCYKQpqsJnlflBA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nUUMxddKHx0=:WTvF1Wfyj2/ouKy4oFxjNw hYhq8wgb4UfSK0NVybZqABq/OCKo+QSD65xfbimTwoZkgEWSPHD30YGFwrA3ADZVtGBYwCSoN JMDHy8rGgJv8gcUDWDkR42jx176v3QRRpj2r7plNJQI3WOO3XyY5i3e0oZLW46c02jdzFJhiZ XOzZJLI2xPVvYmyRqBGHJO9JAaB6qazdzNAIO7cqrXiB0Cw6FYg3XIBB2/uA2HU44a8kuxoch G7jF1sTwsZlWOrpLQqMfS800wdQkHNMeWp/OELaPXZwD5JTdda0xfiSG+Do0VgZxhHmkjgzTv GqTmpfU/alK6h8WeQAW3E9AIpuKWMtTGu0+hovPlfdEJ+29HL5eBUK5F9GqlB4QwT1tn+3AZL A2X2HkWXX7OMYdkN0ffXod/iGxsZuT4eZG01APUc5GKX+8invc8U07FRC8w83cRDdYoFx3LJv ik8ZKoxDADlUY3niMFmNXpt66uJT19w5i2caMsAjiOK+udmbdo+5y4/tEyMi4URj+TXUcA7AY 683/vRlsCokJTINAaizPjipJAfKL+kxsTvmxXoNEWT5wl0fbE51iNtnPqLa6vFZyVvuq/lYlG sn3/gaWyRxRgBIB/H5NuLIhCmTGWb/EPMf/YQcsK48ZEgSXEWcnUgtzMMEDffc94JzToB+j2b 23c2JhWhrYfRvYDU8ziN7twGCF2nuAFPotQyoFJbHuCjYeSzRrZKnLjZdsmAL+Eqfww+QHwTa fjCPE3GH3SqM1noEi8zvojf5VnXYjxA9yCs8jwyYNmva++Ts5HI+RIJqHh58+fEzI3DtzEEFJ HbplIo6Cq4kCf6Lj/SV0AwtiKYyRSPJ8TvsAGL8tVSo0DhvJISMplhpE0qC4cXeVageGUbKAg OHrnrI0r9VGXgW/XnUGQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200107_135106_929980_BF5E4384 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.135 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan , Sriram R , Vasanthakumar Thiagarajan , Muna Sinada , Shashidhar Lakkavalli , Tamizh chelvam , kbuild test robot , Rajkumar Manoharan , Ganesh Sesetti , Sathishkumar Muruganandam , ath11k@lists.infradead.org, Arnd Bergmann , Miles Hu , Julia Lawall , Venkateswara Naralasetty , Govindaraj Saminathan , Pradeep Kumar Chitrapu , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Karthikeyan Periyasamy , "David S. Miller" Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org 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 --- 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 };