summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/common-spectral.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-10-09 18:03:06 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-10-13 20:27:35 +0300
commit72569b7be461ad563c8118c50f26692e53a189bc (patch)
tree09954acfdccdf3304a4d68a4944488b31506fdd4 /drivers/net/wireless/ath/ath9k/common-spectral.c
parente3bfecd5cd37a93c47c146c41d5f1fde7405b592 (diff)
downloadlinux-72569b7be461ad563c8118c50f26692e53a189bc.tar.gz
ath9k: fix RX_STAT_INC() etc macros
A couple of macros that deal with statistics in ath9k rely on the declaration of the 'sc' variable, which they dereference. However, when the statistics are disabled, the new instance in ath_cmn_process_fft() causes a warning for an unused variable: drivers/net/wireless/ath/ath9k/common-spectral.c: In function 'ath_cmn_process_fft': drivers/net/wireless/ath/ath9k/common-spectral.c:474:20: error: unused variable 'sc' [-Werror=unused-variable] It's better if those macros only operate on their arguments instead of known variable names, and adding a cast to (void) kills off that warning. Fixes: 03224678c013 ("ath9k: add counters for good and errorneous FFT/spectral frames") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common-spectral.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common-spectral.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index 6a43d26276e5..6aa3ec024ffa 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -624,9 +624,9 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
tsf, freq, chan_type);
if (ret == 0)
- RX_STAT_INC(rx_spectral_sample_good);
+ RX_STAT_INC(sc, rx_spectral_sample_good);
else
- RX_STAT_INC(rx_spectral_sample_err);
+ RX_STAT_INC(sc, rx_spectral_sample_err);
memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);
@@ -642,9 +642,9 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
tsf, freq, chan_type);
if (ret == 0)
- RX_STAT_INC(rx_spectral_sample_good);
+ RX_STAT_INC(sc, rx_spectral_sample_good);
else
- RX_STAT_INC(rx_spectral_sample_err);
+ RX_STAT_INC(sc, rx_spectral_sample_err);
/* Mix the received bins to the /dev/random
* pool