Received: by 10.223.164.202 with SMTP id h10csp1986320wrb; Mon, 27 Nov 2017 10:07:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMZotFq/pPJq1GlRNoS2o5+vY1g0q+o1dAKfnfZHOiA4x2hk04JztTgn1gG2lFbqXJLuCaiY X-Received: by 10.98.220.218 with SMTP id c87mr37848325pfl.229.1511806076467; Mon, 27 Nov 2017 10:07:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511806076; cv=none; d=google.com; s=arc-20160816; b=jArsVFAJraZg0bHtd1RYW/zXEGVnwxhena+Q/7X+c9Z4Ah8OmUygHiQDkvlrBwS3qN n1mzsYhxvMCIulYmDb8QVrHJ8GK/wlbTgAlB3UgZ6b3pCLu6ZRyodLE9ynAUnFZykHcw SKEO8JkC6cfegeArSF9Ve4bJ9dnmlHv/ILB25JjcPLUJwOpqty3MPfokICsuTrtBvjwk LgilroBIlUM/99Lu+6gUbmb3r62L3PeSp16DH6OVI2Dg0bUXgxFFIfFCPdasZPSdnSmm 8TfNBDDD+aNT10M4R+vZlnDtPv8gskhNcV0qjKxXx2VLNmY3/RbHJuIeN5S+e/uX8Pqy AKHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HaW+xh4Xzrqiw7ENS1SQwFpHswBZjYFnRVZDvPHAntU=; b=W8iiYofi3cSH+ZNOT+StgM8GHXMLFKD47cQvhkiR71OwzwARS1sJVjFLQugzuNSg8N 8lgwz8VavzzCZFZyfNY2d38TFU4k/mBvmzoiGx8/X1oTd+JhZw9tHncCmxXb8Y3Efhs+ /QQdetcQDRS4cPkVmXIriO9Pw5iR3DH1BTzyMeM11Kl9HLxExVD3FQIHPaJ+MYXT0EUn 1MTbzwnER7gnFKoWgresQBEd6DiqmjwRqe0dLicoBvX7eh8A4lBzw7YR426djeod5DPV carKjLVpLvGwlA0pTnQlQqHk18aUfH+mNLdhFQnq24vm0XlBQo+RN+IYpabEEP6CeMln 5pvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si23473996plb.316.2017.11.27.10.07.44; Mon, 27 Nov 2017 10:07:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932512AbdK0SFx (ORCPT + 78 others); Mon, 27 Nov 2017 13:05:53 -0500 Received: from chaos.universe-factory.net ([31.24.148.19]:38456 "EHLO chaos.universe-factory.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932225AbdK0SFt (ORCPT ); Mon, 27 Nov 2017 13:05:49 -0500 Received: from localhost.localdomain (unknown [IPv6:2a00:c1a0:8084:2700:688b:f9c4:45d6:d265]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by chaos.universe-factory.net (Postfix) with ESMTPSA id 527BA187FC3; Mon, 27 Nov 2017 18:56:31 +0100 (CET) From: Matthias Schiffer To: kvalo@qca.qualcomm.com Cc: ath9k-devel@qca.qualcomm.com, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@nbd.name Subject: [PATCH 2/3] ath9k: move spectral scan support under a separate config symbol Date: Mon, 27 Nov 2017 18:56:22 +0100 Message-Id: <1c982c915065a9b5ed3232eedb567f589eca261b.1511804622.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.15.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the moment, spectral scan support, and with it RELAY, is always enabled with ATH9K[_HTC]_DEBUGFS. Spectral scan support is currently the only user of RELAY in ath9k, and it unconditionally reserves a relay channel. Having debugfs support in ath9k is often useful even on very small embedded routers, where we'd rather like to avoid the code size and RAM usage of the relay support. Signed-off-by: Matthias Schiffer --- drivers/net/wireless/ath/ath9k/Kconfig | 14 ++++++++++---- drivers/net/wireless/ath/ath9k/Makefile | 4 ++-- drivers/net/wireless/ath/ath9k/common-spectral.h | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index 783a38f1a626..1f3523019509 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig @@ -61,13 +61,12 @@ config ATH9K_DEBUGFS depends on ATH9K && DEBUG_FS select MAC80211_DEBUGFS select ATH9K_COMMON_DEBUG - select RELAY ---help--- Say Y, if you need access to ath9k's statistics for interrupts, rate control, etc. - Also required for changing debug message flags at run time. - As well as access to the FFT/spectral data and TX99. + Also required for changing debug message flags at run time and for + TX99. config ATH9K_STATION_STATISTICS bool "Detailed station statistics" @@ -177,7 +176,6 @@ config ATH9K_HTC_DEBUGFS bool "Atheros ath9k_htc debugging" depends on ATH9K_HTC && DEBUG_FS select ATH9K_COMMON_DEBUG - select RELAY ---help--- Say Y, if you need access to ath9k_htc's statistics. As well as access to the FFT/spectral data. @@ -192,3 +190,11 @@ config ATH9K_HWRNG Say Y, feeds the entropy directly from the WiFi driver to the input pool. + +config ATH9K_COMMON_SPECTRAL + bool "Atheros ath9k/ath9k_htc spectral scan support" + depends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS + select RELAY + default n + ---help--- + Say Y to enable access to the FFT/spectral data via debugfs. diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile index 90e4a341076c..80197101eda7 100644 --- a/drivers/net/wireless/ath/ath9k/Makefile +++ b/drivers/net/wireless/ath/ath9k/Makefile @@ -61,8 +61,8 @@ ath9k_common-y:= common.o \ common-init.o \ common-beacon.o -ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o \ - common-spectral.o +ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o +ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o ath9k_htc-y += htc_hst.o \ hif_usb.o \ diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.h b/drivers/net/wireless/ath/ath9k/common-spectral.h index 5d1a51d83aa6..303ab470ce34 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.h +++ b/drivers/net/wireless/ath/ath9k/common-spectral.h @@ -151,7 +151,7 @@ static inline u8 spectral_bitmap_weight(u8 *bins) return bins[0] & 0x3f; } -#ifdef CONFIG_ATH9K_COMMON_DEBUG +#ifdef CONFIG_ATH9K_COMMON_SPECTRAL void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy); void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv); @@ -183,6 +183,6 @@ static inline int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, { return 0; } -#endif /* CONFIG_ATH9K_COMMON_DEBUG */ +#endif /* CONFIG_ATH9K_COMMON_SPECTRAL */ #endif /* SPECTRAL_H */ -- 2.15.0 From 1586134539045807820@xxx Thu Dec 07 14:09:32 +0000 2017 X-GM-THRID: 1586129871174871043 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread