From patchwork Mon Oct 15 07:55:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 1592621 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C20F53FD86 for ; Mon, 15 Oct 2012 08:12:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751094Ab2JOIMl (ORCPT ); Mon, 15 Oct 2012 04:12:41 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:11713 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002Ab2JOIMj (ORCPT ); Mon, 15 Oct 2012 04:12:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1350288759; x=1381824759; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=QRPDyTLF09ESx2C4QdwFnAprdf2aKNdhUQM9+fTXKy8=; b=dY471u9xMiI3FYP6wxDxEn8d0jXMO0XoOpBlHht5hRW1fFE/phiC5GXx 2WxWzanRJTUglxeiX6vH36ZNY1ppgt6saMAVWAxbdV8ipGwIY8SzhvQ0w zMt9iAddFSTiw9oHtp/8eUrUa7i7Q1JGPQTqfJc6F2cn5UF6WoF+SMWLf s=; X-IronPort-AV: E=McAfee;i="5400,1158,6865"; a="250919805" Received: from ironmsg02-r.qualcomm.com ([172.30.46.16]) by wolverine01.qualcomm.com with ESMTP; 15 Oct 2012 00:56:20 -0700 X-IronPort-AV: E=Sophos;i="4.80,587,1344236400"; d="scan'208";a="163510730" Received: from nasanexhc07.na.qualcomm.com ([172.30.39.190]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 15 Oct 2012 00:56:20 -0700 Received: from qcmail1.qualcomm.com (172.30.39.5) by qcmail1.qualcomm.com (172.30.39.190) with Microsoft SMTP Server (TLS) id 14.2.318.1; Mon, 15 Oct 2012 00:56:18 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Mon, 15 Oct 2012 13:26:18 +0530 From: Rajkumar Manoharan To: CC: , Bala Shanmugam Subject: [PATCH 04/12] ath9k: turn off RXIQ calibration while re-calibrating radio Date: Mon, 15 Oct 2012 13:25:30 +0530 Message-ID: <1350287738-18687-5-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1350287738-18687-1-git-send-email-rmanohar@qca.qualcomm.com> References: <1350287738-18687-1-git-send-email-rmanohar@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [172.30.39.5] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Bala Shanmugam TXIQ and RXIQ share the same data path to upload the measurement result, we should turn off RXIQ calibration while re-calibrating radio Signed-off-by: Bala Shanmugam --- drivers/net/wireless/ath/ath9k/ar9003_mci.c | 6 ++++++ drivers/net/wireless/ath/ath9k/ar9003_phy.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index b2b9941..c46d8f1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c @@ -750,6 +750,9 @@ int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, mci_hw->bt_state = MCI_BT_AWAKE; + REG_CLR_BIT(ah, AR_PHY_TIMING4, + 1 << AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT); + if (caldata) { caldata->done_txiqcal_once = false; caldata->done_txclcal_once = false; @@ -759,6 +762,9 @@ int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, if (!ath9k_hw_init_cal(ah, chan)) return -EIO; + REG_SET_BIT(ah, AR_PHY_TIMING4, + 1 << AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT); + exit: ar9003_mci_enable_interrupt(ah); return 0; diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index 9a48e3d..8f58523 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h @@ -32,6 +32,7 @@ #define AR_PHY_SPUR_REG (AR_CHAN_BASE + 0x1c) #define AR_PHY_RX_IQCAL_CORR_B0 (AR_CHAN_BASE + 0xdc) #define AR_PHY_TX_IQCAL_CONTROL_3 (AR_CHAN_BASE + 0xb0) +#define AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT 16 #define AR_PHY_TIMING11_SPUR_FREQ_SD 0x3FF00000 #define AR_PHY_TIMING11_SPUR_FREQ_SD_S 20