summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/common-spectral.c
diff options
context:
space:
mode:
authorNick Kossifidis <mickflemm@gmail.com>2015-04-29 23:51:20 +0000
committerKalle Valo <kvalo@codeaurora.org>2015-05-09 16:46:17 +0300
commit3ea2ce3f7e63728b97fb52be4034ba3d8f5ddba5 (patch)
treec86f6004a00f25466359cb9d1a9f3ff6f42bc6e0 /drivers/net/wireless/ath/ath9k/common-spectral.c
parent6b8f85a9188321e59995d172efab9e97afd3906f (diff)
downloadlwn-3ea2ce3f7e63728b97fb52be4034ba3d8f5ddba5.tar.gz
lwn-3ea2ce3f7e63728b97fb52be4034ba3d8f5ddba5.zip
ath9k: No need for that extra memset
Temp buffer is only used for fixing malformed frames, there is no need to memset it every time. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index 4ab08edeb065..5840b3731d5b 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -645,6 +645,8 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
fft_handler(rs, spec_priv, sample_buf,
tsf, freq, chan_type);
+
+ memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);
}
/* Process a normal frame */
@@ -658,7 +660,6 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
if (len <= fft_len + 2)
break;
- memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);
sample_start = &vdata[i + 1];
/* -1 to grab sample_len -1, -2 since