ath9k: No need for that extra memset
authorNick Kossifidis <mickflemm@gmail.com>
Wed, 29 Apr 2015 23:51:20 +0000 (23:51 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 9 May 2015 13:46:17 +0000 (16:46 +0300)
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>
drivers/net/wireless/ath/ath9k/common-spectral.c

index 4ab08edeb065e4a104f579da9c27f60d737ff084..5840b3731d5ba030b46815c0087be9d41a11d069 100644 (file)
@@ -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
This page took 0.024938 seconds and 5 git commands to generate.