Skip to content

Commit

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

0 comments on commit 3ea2ce3

Please sign in to comment.