From patchwork Tue Sep 6 14:48:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 1126532 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p86EmMpM012926 for ; Tue, 6 Sep 2011 14:48:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044Ab1IFOsT (ORCPT ); Tue, 6 Sep 2011 10:48:19 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:23435 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209Ab1IFOsT (ORCPT ); Tue, 6 Sep 2011 10:48:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=rmanohar@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1315320499; x=1346856499; h=from:to:cc:subject:date:message-id:mime-version; z=From:=20Rajkumar=20Manoharan=20|To:=20|CC:=20,=20Rajkumar=20Manoharan=0D=0A=09,=20|Subject:=20[PAT CH]=20ath9k_hw:=20Fix=20magnitude/phase=20coeff=20correct ion|Date:=20Tue,=206=20Sep=202011=2020:18:50=20+0530 |Message-ID:=20<1315320530-2733-1-git-send-email-rmanohar @qca.qualcomm.com>|MIME-Version:=201.0; bh=0ojueNtS9v5z/gxIPSAWYOPslJkvv3n3Fg5BPg+RhmY=; b=JyXHmTe0oXcsGatJlTuX9CLErMDr/DAialGAd7jPCsMPWtP++wCoW3II Tt3AplfEAGyNAbdQwjKAWvO+Q0gVGKAwnYsWhFE/I9CWCNtGhpjvd8NpO UEj1Dc+IYszZ9IJxzKvZ04isI4nPt/vzvXaeInCf7zPsqHUO1NEG52Ixi Y=; X-IronPort-AV: E=McAfee;i="5400,1158,6460"; a="115636736" Received: from ironmsg02-r.qualcomm.com ([172.30.46.16]) by wolverine02.qualcomm.com with ESMTP; 06 Sep 2011 07:48:18 -0700 X-IronPort-AV: E=Sophos;i="4.68,338,1312182000"; d="scan'208";a="155610416" Received: from nasanexhub01.na.qualcomm.com ([10.46.93.121]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/RC4-MD5; 06 Sep 2011 07:48:18 -0700 Received: from NASJOEXHC01.na.qualcomm.com (10.234.56.15) by nasanexhub01.na.qualcomm.com (10.46.93.121) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 6 Sep 2011 07:48:18 -0700 Received: from qcamail1.atheros.com (10.12.7.11) by qcamail1.atheros.com (10.234.56.15) with Microsoft SMTP Server (TLS) id 14.1.323.3; Tue, 6 Sep 2011 07:48:16 -0700 Received: by qcamail1.atheros.com (sSMTP sendmail emulation); Tue, 06 Sep 2011 20:18:51 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan , Subject: [PATCH] ath9k_hw: Fix magnitude/phase coeff correction Date: Tue, 6 Sep 2011 20:18:50 +0530 Message-ID: <1315320530-2733-1-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.7.6.1 MIME-Version: 1.0 X-Originating-IP: [10.12.7.11] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 06 Sep 2011 14:48:31 +0000 (UTC) Do the magnitude/phase coeff correction only if the outlier is detected. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/ar9003_calib.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index fa35a02..ee3a8a2 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -643,8 +643,9 @@ static void ar9003_hw_detect_outlier(int *mp_coeff, int nmeasurement, outlier_idx = max_idx; else outlier_idx = min_idx; + + mp_coeff[outlier_idx] = mp_avg; } - mp_coeff[outlier_idx] = mp_avg; } static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,