Skip to content

Commit

Permalink
ath9k: No need for that extra memcpy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Kossifidis authored and Kalle Valo committed May 9, 2015
1 parent 0f2c75d commit 9acc98b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/ath/ath9k/common-spectral.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9acc98b

Please sign in to comment.