From patchwork Wed Apr 29 23:51:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 6299251 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C3FA9F373 for ; Wed, 29 Apr 2015 23:52:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA91E2017D for ; Wed, 29 Apr 2015 23:52:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E644920160 for ; Wed, 29 Apr 2015 23:52:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847AbbD2XwP (ORCPT ); Wed, 29 Apr 2015 19:52:15 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:38599 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbbD2XwL (ORCPT ); Wed, 29 Apr 2015 19:52:11 -0400 Received: by igbhj9 with SMTP id hj9so63879971igb.1 for ; Wed, 29 Apr 2015 16:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FoYKCCNJp1ZzJ7aJo9dPiVTvy2d0ZTmU+Rm4oUYUdtE=; b=ujoH8EGYLo4vGxOtCXSIHN/+kSCaeLWv2DXJWZSFKI2IR4+BolM4rjaRVWIg6Hqn7I EGlDLD3e8NfOukVXdKBo0HZwUX2ZOk7RNG338yvgRd3FH5y56bxoK7TDk4MeQyzd+cXF Rcn2QIrLkIo+4PqG7Jt+ScA0aIlvBPc5VtQDmMGnyCU2Kbx66Ua5ZoApJYu/dQLzvF1j E15A9COp1tqRUhxLR4SO87UaLi+Ek+eWKXYDYkrCswQwkWlwlg+WlxZ7oXPYYUJ9AaWE 3kzpQ/kkt9BVj1RyOdCOD8TH+D9k/w0FnLMyllzTXq428OHQ6/4abNE4UMP6KC9jZAU7 Bn4Q== X-Received: by 10.42.104.143 with SMTP id r15mr6383852ico.33.1430351530729; Wed, 29 Apr 2015 16:52:10 -0700 (PDT) Received: from cobra (rochester-wireless-nat.mayo.edu. [129.176.197.220]) by mx.google.com with ESMTPSA id vk8sm10232148igb.4.2015.04.29.16.52.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 16:52:10 -0700 (PDT) Received: by cobra (sSMTP sendmail emulation); Wed, 29 Apr 2015 23:52:08 +0000 From: "Nick Kossifidis" To: kvalo@codeaurora.org, ath9k-devel@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, adrian.chadd@gmail.com, Nick Kossifidis Subject: [PATCH 07/11] ath9k: No need for that extra memcpy Date: Wed, 29 Apr 2015 23:51:18 +0000 Message-Id: <1430351482-59418-8-git-send-email-mickflemm@gmail.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1430351482-59418-1-git-send-email-mickflemm@gmail.com> References: <1430351482-59418-1-git-send-email-mickflemm@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No need to copy the frame to the temporary buffer when its length is ok. Signed-off-by: Nick Kossifidis --- drivers/net/wireless/ath/ath9k/common-spectral.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c index 0c9bc9e..b8682bc 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -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.