From patchwork Thu Nov 24 06:53:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaoqing Pan X-Patchwork-Id: 9444915 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87A9860778 for ; Thu, 24 Nov 2016 06:53:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EC6626E82 for ; Thu, 24 Nov 2016 06:53:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 723902715B; Thu, 24 Nov 2016 06:53:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2807526E82 for ; Thu, 24 Nov 2016 06:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756124AbcKXGxl (ORCPT ); Thu, 24 Nov 2016 01:53:41 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49908 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755878AbcKXGxk (ORCPT ); Thu, 24 Nov 2016 01:53:40 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4A1A86156C; Thu, 24 Nov 2016 06:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1479970420; bh=qOtv5bPcoUWSCYymhc0ixyxrj4YZyW2wu+K1YeICntk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZwkH4LK+F8SWqXxKLgl+fuBCFQvNEWnhQfz2kk2gCXtUWAZfsz3zp7egxN/60jW5R TpbBStFSi2qGRqdRLWNbTq3Q9QI2Oe/rDy1bCeunztP0eI70wXLYZVEIOusXDhRz5o Nxb0FH8ftxobxw0xHVlAM1FTjiL05tE+1gOirzGE= Received: from smtp.codeaurora.org (unknown [180.166.53.21]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: miaoqing@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 11D3561517; Thu, 24 Nov 2016 06:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1479970420; bh=qOtv5bPcoUWSCYymhc0ixyxrj4YZyW2wu+K1YeICntk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZwkH4LK+F8SWqXxKLgl+fuBCFQvNEWnhQfz2kk2gCXtUWAZfsz3zp7egxN/60jW5R TpbBStFSi2qGRqdRLWNbTq3Q9QI2Oe/rDy1bCeunztP0eI70wXLYZVEIOusXDhRz5o Nxb0FH8ftxobxw0xHVlAM1FTjiL05tE+1gOirzGE= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 11D3561517 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=miaoqing@codeaurora.org Received: by smtp.codeaurora.org (sSMTP sendmail emulation); Thu, 24 Nov 2016 14:53:35 +0800 From: miaoqing@codeaurora.org To: kvalo@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, ath9k-devel@qca.qualcomm.com, Miaoqing Pan Subject: [PATCH 3/3] ath9k: disable ACK_CTS for SOC chips in PTA mode Date: Thu, 24 Nov 2016 14:53:22 +0800 Message-Id: <1479970402-13796-3-git-send-email-miaoqing@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479970402-13796-1-git-send-email-miaoqing@codeaurora.org> References: <1479970402-13796-1-git-send-email-miaoqing@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Miaoqing Pan If the ACK_CTS is enabled, MAC will send an ACK or CTS in response to a received frame, but it is a interfering packet for the BT(or other) in the PTA cycle, which will sufficient corrupt the received packets. Only disable it for SOC chips in PTA(slotted) mode. Signed-off-by: Miaoqing Pan --- drivers/net/wireless/ath/ath9k/btcoex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 6d15dd3..7e24640 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c @@ -290,6 +290,7 @@ static void ath9k_hw_btcoex_enable_3wire(struct ath_hw *ah) struct ath_btcoex_hw *btcoex = &ah->btcoex_hw; u32 val; int i; + int coex_mode = MS(btcoex->bt_coex_mode, AR_BT_MODE); /* * Program coex mode and weight registers to @@ -319,7 +320,11 @@ static void ath9k_hw_btcoex_enable_3wire(struct ath_hw *ah) REG_WRITE(ah, 0x50040, val); } - REG_RMW_FIELD(ah, AR_QUIET1, AR_QUIET1_QUIET_ACK_CTS_ENABLE, 1); + if (AR_SREV_SOC(ah) && (coex_mode == ATH_BT_COEX_MODE_SLOTTED)) + REG_RMW_FIELD(ah, AR_QUIET1, AR_QUIET1_QUIET_ACK_CTS_ENABLE, 0); + else + REG_RMW_FIELD(ah, AR_QUIET1, AR_QUIET1_QUIET_ACK_CTS_ENABLE, 1); + REG_RMW_FIELD(ah, AR_PCU_MISC, AR_PCU_BT_ANT_PREVENT_RX, 0); ath9k_hw_gpio_request_out(ah, btcoex->wlanactive_gpio,