From patchwork Tue Apr 12 17:37:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 8813051 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 083D29F54F for ; Tue, 12 Apr 2016 17:39:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16AFA2035D for ; Tue, 12 Apr 2016 17:39:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D074D20272 for ; Tue, 12 Apr 2016 17:39:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756097AbcDLRjJ (ORCPT ); Tue, 12 Apr 2016 13:39:09 -0400 Received: from mout.gmx.net ([212.227.15.19]:58444 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbcDLRjI (ORCPT ); Tue, 12 Apr 2016 13:39:08 -0400 Received: from ultralex.clients.ffhi ([37.48.74.42]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MKIEQ-1apUIO0Wtq-001fib; Tue, 12 Apr 2016 19:37:54 +0200 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, kvalo@codeaurora.org, lkml2017@openmailbox.org Cc: Oleksij Rempel Subject: [PATCH] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Date: Tue, 12 Apr 2016 19:37:44 +0200 Message-Id: <1460482664-21086-1-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 2.5.0 In-Reply-To: <120e427452ad7e93f17828e8bba4b043@openmailbox.org> References: <120e427452ad7e93f17828e8bba4b043@openmailbox.org> X-Provags-ID: V03:K0:vAzLooSIkluRciQN1MTWzT+zjGK9NOg+gxHrlsLYRWgUKFvfn5n 1F18FBQD9yJM3k3hfXCBE2tvLL/gg6DmwxLsKf7do0H7RVyG7jwyVl6brYGbgIcab4mleod BSIAzY3mhT+50XWxQKFyp4aL+qdvcvLBvpUnpN+l8dgYGf1pUHGFuOqe+P42cZ+P86GhfMe nDXw9rMfwWxvjvRN5ndlg== X-UI-Out-Filterresults: notjunk:1; V01:K0:WDKjK2bxX0A=:iBNx3jiOIud8rgriqfVWR3 DmROZ5S+gJPArdfLaC5K0BzsIKVFlNpEwG+3bE2W7JjyPJ4tpsq/Y50dpZ8JdByaei0nq7DR6 vHHIhC7x2s0ClzokCda4vQ0wYNNkSVt0705KnsXAs/Ivo4mgs1zXECyHx2JgllRmnl5/SyQUI ktPKpWSVph1MH8dY1TTUUhW6UP011+qRI0RqMfTynZWQP7utt5CGh6+q1DIZEZVaBhuns+mkB zzmFdi0IU0lJALFiNC0ajS5tlokEZ7G/d+NxwFC5Evvl6uaRnh1iUtqHsoVy0ZIJfCBkDRwFW XfCQKqVT1kOOatSKoPAzMRysRHaL6xFhgdoOwwJpuIc9hubRz6UlCvELyJN9xBfz0mVS2+k7b pUAY6pQU3DaIpOD1X2jFMIOkHnKwpdHJKUeYah+bfdVksNy6GOfuJCR2UzTOUdI1u4PalHs6t o9iO8oAZsuBMT/eEMR1qfWDl+ToMa+KBJMbSxOWKe16R8RZ1KkbIMJWMhl5YKVVtg9m3Kr03U sl4n1nKzuKK7JiInctLMYuJpia/fUz+Xx95yRguZMpw6gzrXy+zUIsEkzHCHoX32VCqwZRXqO 3M49E6rEh+rVCwSN4+6UcjUr+iB8OWCxNT+XiN5QHuEKov8yjFqBRB0ZSsT6c6s9T6OX6xlhJ YPpPJBN2Fm3EScdV7oVmphvUxRgyE5RA6Asv8dx9bBv68sL2OPxeewA6HdeinUkkUZjk9tWkM gR7l8wx1ja0zU/f6fGmi7b2jfjrlH0Nb/Vn6w8kKnhq5sopTewmujcGfPA6/V+qfCQ6m2RdVQ 8HxhbW7 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move mask_m & mask_p initialisation. This coused a performance regression on ar9281. Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.") Reported-by: Gustav Frederiksen Tested-by: Gustav Frederiksen Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/ar5008_phy.c | 8 +++----- drivers/net/wireless/ath/ath9k/ar9002_phy.c | 5 ----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 8f87930..1b271b9 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -274,6 +274,9 @@ void ar5008_hw_cmn_spur_mitigate(struct ath_hw *ah, }; static const int inc[4] = { 0, 100, 0, 0 }; + memset(&mask_m, 0, sizeof(int8_t) * 123); + memset(&mask_p, 0, sizeof(int8_t) * 123); + cur_bin = -6000; upper = bin + 100; lower = bin - 100; @@ -424,14 +427,9 @@ static void ar5008_hw_spur_mitigate(struct ath_hw *ah, int tmp, new; int i; - int8_t mask_m[123]; - int8_t mask_p[123]; int cur_bb_spur; bool is2GHz = IS_CHAN_2GHZ(chan); - memset(&mask_m, 0, sizeof(int8_t) * 123); - memset(&mask_p, 0, sizeof(int8_t) * 123); - for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz); if (AR_NO_SPUR == cur_bb_spur) diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c index db66245..53d7445 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c @@ -178,14 +178,9 @@ static void ar9002_hw_spur_mitigate(struct ath_hw *ah, int i; struct chan_centers centers; - int8_t mask_m[123]; - int8_t mask_p[123]; int cur_bb_spur; bool is2GHz = IS_CHAN_2GHZ(chan); - memset(&mask_m, 0, sizeof(int8_t) * 123); - memset(&mask_p, 0, sizeof(int8_t) * 123); - ath9k_hw_get_channel_centers(ah, chan, ¢ers); freq = centers.synth_center;