ath9k: No need for that extra memcpy
authorNick Kossifidis <mickflemm@gmail.com>
Wed, 29 Apr 2015 23:51:18 +0000 (23:51 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 9 May 2015 13:46:15 +0000 (16:46 +0300)
No need to copy the frame to the temporary buffer when its length
is ok.

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 0c9bc9ea5d9d6153901433ed5cbdb012309c2104..b8682bc4f7ac2e204c75fd74bd75a5d293a97a47 100644 (file)
@@ -620,11 +620,9 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
                        }
 
                        /* Process a normal frame */
-                       if (sample_bytes == sample_len) {
-                               memcpy(sample_buf, sample_start, sample_len);
-                               ret = fft_handler(rs, spec_priv, sample_buf,
+                       if (sample_bytes == sample_len)
+                               ret = fft_handler(rs, spec_priv, sample_start,
                                                  tsf, freq, chan_type);
-                       }
 
                        /* Short report processed, break out of the
                         * loop.