From patchwork Tue Sep 25 08:18:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bala Shanmugam X-Patchwork-Id: 1502721 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AA455DF28C for ; Tue, 25 Sep 2012 08:22:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753841Ab2IYIWZ (ORCPT ); Tue, 25 Sep 2012 04:22:25 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:32823 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753679Ab2IYIWW (ORCPT ); Tue, 25 Sep 2012 04:22:22 -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=1348561342; x=1380097342; h=from:to:cc:subject:date:message-id:mime-version; bh=8z/QKEYyKnmmhgCovsWpeOJH7h2DEK53bAg6gUUICxo=; b=XdHJWoRSFtGaPTToDnzm97CQSYFUj+Su9o1Ttcu5YLOUniKapzXbLutk /zQxEhTMb5X+btUH91S+XhyZXbpXD11030yc4JQCIdy1txtcKh0dcpygg l6FBnfBB5NkND1fYBzaQuMG2ga8GcbzsgH1nsejIregmEqEFCP5pYMnux 4=; X-IronPort-AV: E=McAfee;i="5400,1158,6845"; a="240754070" Received: from ironmsg02-l.qualcomm.com ([172.30.48.16]) by wolverine01.qualcomm.com with ESMTP; 25 Sep 2012 01:22:06 -0700 X-IronPort-AV: E=Sophos;i="4.80,479,1344236400"; d="scan'208";a="123938888" Received: from nasanexhc07.na.qualcomm.com ([172.30.39.190]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Sep 2012 01:22:06 -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; Tue, 25 Sep 2012 01:22:05 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 25 Sep 2012 13:48:40 +0530 From: Bala Shanmugam To: CC: Subject: [PATCH] ath9k: Enable MCI for Aphrodite Date: Tue, 25 Sep 2012 13:48:40 +0530 Message-ID: <1348561120-3276-1-git-send-email-bkamatch@qca.qualcomm.com> X-Mailer: git-send-email 1.7.4.1 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: Bala Shanmugam --- drivers/net/wireless/ath/ath9k/btcoex.c | 19 +++++++++++++++---- drivers/net/wireless/ath/ath9k/gpio.c | 2 +- drivers/net/wireless/ath/ath9k/wow.c | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index acd4373..88c4927 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c @@ -51,6 +51,14 @@ static const u32 ar9462_wlan_weights[ATH_BTCOEX_STOMP_MAX] { 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */ }; +static const u32 ar9565_wlan_weights[ATH_BTCOEX_STOMP_MAX] + [AR9300_NUM_WLAN_WEIGHTS] = { + { 0x01017d01, 0x7d7d7d01, 0x7d7d7d01, 0x7d7d7d7d }, /* STOMP_ALL */ + { 0x01017d01, 0x3b3b3b01, 0x3b3b3b01, 0x3b3b3b3b }, /* STOMP_LOW */ + { 0x01017d01, 0x01010101, 0x01010101, 0x01010101 }, /* STOMP_NONE */ + { 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */ +}; + void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum) { struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; @@ -282,7 +290,7 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah) ath9k_hw_btcoex_enable_2wire(ah); break; case ATH_BTCOEX_CFG_3WIRE: - if (AR_SREV_9462(ah)) { + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { ath9k_hw_btcoex_enable_mci(ah); return; } @@ -304,7 +312,7 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah) int i; btcoex_hw->enabled = false; - if (AR_SREV_9462(ah)) { + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); for (i = 0; i < AR9300_NUM_BT_WEIGHTS; i++) REG_WRITE(ah, AR_MCI_COEX_WL_WEIGHTS(i), @@ -339,11 +347,14 @@ static void ar9003_btcoex_bt_stomp(struct ath_hw *ah, const u32 *weight = ar9003_wlan_weights[stomp_type]; int i; - if (AR_SREV_9462(ah)) { + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { if ((stomp_type == ATH_BTCOEX_STOMP_LOW) && btcoex->mci.stomp_ftp) stomp_type = ATH_BTCOEX_STOMP_LOW_FTP; - weight = ar9462_wlan_weights[stomp_type]; + if (AR_SREV_9565(ah)) + weight = ar9565_wlan_weights[stomp_type]; + else + weight = ar9462_wlan_weights[stomp_type]; } for (i = 0; i < AR9300_NUM_WLAN_WEIGHTS; i++) { diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 45f2422..83a204d 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -402,7 +402,7 @@ void ath9k_stop_btcoex(struct ath_softc *sc) if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) ath9k_btcoex_timer_pause(sc); ath9k_hw_btcoex_disable(ah); - if (AR_SREV_9462(ah)) + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) ath_mci_flush_profile(&sc->btcoex.mci); } } diff --git a/drivers/net/wireless/ath/ath9k/wow.c b/drivers/net/wireless/ath/ath9k/wow.c index 44a08eb..a483d51 100644 --- a/drivers/net/wireless/ath/ath9k/wow.c +++ b/drivers/net/wireless/ath/ath9k/wow.c @@ -497,7 +497,7 @@ void ath9k_hw_wow_enable(struct ath_hw *ah, u32 pattern_enable) REG_RMW(ah, AR_PCIE_PM_CTRL, set, clr); - if (AR_SREV_9462(ah)) { + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { /* * this is needed to prevent the chip waking up * the host within 3-4 seconds with certain