From patchwork Thu Nov 19 22:02:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?THVrw4PCocOFwqEgVHVyZWs=?= <8an@praha12.net> X-Patchwork-Id: 61472 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAJM9a63027060 for ; Thu, 19 Nov 2009 22:09:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756763AbZKSWJ3 (ORCPT ); Thu, 19 Nov 2009 17:09:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756741AbZKSWJ3 (ORCPT ); Thu, 19 Nov 2009 17:09:29 -0500 Received: from parez.praha12.net ([78.102.11.253]:53566 "EHLO parez.praha12.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756686AbZKSWJ2 (ORCPT ); Thu, 19 Nov 2009 17:09:28 -0500 X-Greylist: delayed 447 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Nov 2009 17:09:28 EST Received: from 8an.javor.praha12.czf (8an.javor.praha12.czf [10.27.67.2]) by parez.praha12.net (Postfix) with ESMTPS id 6B532C26F7; Thu, 19 Nov 2009 23:02:05 +0100 (CET) To: linville@tuxdriver.com Subject: [PATCH] ath5k: Fix I/Q calibration From: =?utf-8?q?Luk=C3=A1=C5=A1_Turek?= <8an@praha12.net> Reply-To: 8an@praha12.net Cc: linux-wireless@vger.kernel.org Date: Thu, 19 Nov 2009 23:02:02 +0100 MIME-Version: 1.0 Message-Id: <200911192302.05229.8an@praha12.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 8959907..6af0a73 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -1399,7 +1399,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah, if (i_coffd == 0 || q_coffd == 0) goto done; - i_coff = ((-iq_corr) / i_coffd) & 0x3f; + i_coff = ((-iq_corr) / i_coffd); /* Boundary check */ if (i_coff > 31) @@ -1407,7 +1407,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah, if (i_coff < -32) i_coff = -32; - q_coff = (((s32)i_pwr / q_coffd) - 128) & 0x1f; + q_coff = (((s32)i_pwr / q_coffd) - 128); /* Boundary check */ if (q_coff > 15)