From patchwork Mon Oct 15 07:55:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 1592661 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 B27003FD86 for ; Mon, 15 Oct 2012 08:13:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271Ab2JOINa (ORCPT ); Mon, 15 Oct 2012 04:13:30 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:44030 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088Ab2JOIN3 (ORCPT ); Mon, 15 Oct 2012 04:13:29 -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=1350288809; x=1381824809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=8vvy+GOQZMLIBC8FiPyg3+YVQZtD9jjeY+mK9JHoZRE=; b=Rt8TD06YkeUh/HmWkgpNa0Sx/RepMMYzB2mtumL4RzWJxn3guBux7yaU L47aZjJ5h2BELGCX6v4niXTjk13P6OFy6vmofEFxnBLMMQGBpNXIcPfs9 KVJD5IlcJ/izAISWEqWYPyachmAB8gvUk56n0FgF0Wzcn6EsbdUhl0l39 c=; X-IronPort-AV: E=McAfee;i="5400,1158,6865"; a="248604379" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by wolverine02.qualcomm.com with ESMTP; 15 Oct 2012 00:56:32 -0700 X-IronPort-AV: E=Sophos;i="4.80,587,1344236400"; d="scan'208";a="351212175" Received: from nasanexhc07.na.qualcomm.com ([172.30.39.190]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 15 Oct 2012 00:56:28 -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:27 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Mon, 15 Oct 2012 13:26:27 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 05/12] ath9k_hw: Disable MCI stat counter by default for AR9565 Date: Mon, 15 Oct 2012 13:25:31 +0530 Message-ID: <1350287738-18687-6-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 Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/ar9003_mci.c | 11 ++++++++++- drivers/net/wireless/ath/ath9k/reg.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index c46d8f1..466ac8da 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c @@ -938,6 +938,9 @@ int ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g, mci->ready = true; ar9003_mci_prep_interface(ah); + if (AR_SREV_9565(ah)) + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); if (en_int) ar9003_mci_enable_interrupt(ah); @@ -1179,13 +1182,19 @@ int ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf, u16 len, u32 sched_addr) { struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; + int ret; mci->gpm_addr = gpm_addr; mci->gpm_buf = gpm_buf; mci->gpm_len = len; mci->sched_addr = sched_addr; - return ar9003_mci_reset(ah, true, true, true); + ret = ar9003_mci_reset(ah, true, true, true); + + if (AR_SREV_9565(ah)) + REG_RMW_FIELD(ah, AR_MCI_DBG_CNT_CTRL, + AR_MCI_DBG_CNT_CTRL_ENABLE, 0); + return ret; } EXPORT_SYMBOL(ar9003_mci_setup); diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index c7a9ea7..8f40dba 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h @@ -2363,5 +2363,8 @@ enum { #define AR_MCI_MISC 0x1a74 #define AR_MCI_MISC_HW_FIX_EN 0x00000001 #define AR_MCI_MISC_HW_FIX_EN_S 0 +#define AR_MCI_DBG_CNT_CTRL 0x1a78 +#define AR_MCI_DBG_CNT_CTRL_ENABLE 0x00000001 +#define AR_MCI_DBG_CNT_CTRL_ENABLE_S 0 #endif