From patchwork Mon Aug 17 15:15:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 266148 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21758C433E1 for ; Mon, 17 Aug 2020 18:48:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02F58204EC for ; Mon, 17 Aug 2020 18:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597690138; bh=aEs59r/tWiUmQw/L2vM83zIJrUO60M5LIbt0D1F46tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KKMetO/NIzglXzy5wXlQRzp29oOYZ6oK3VZnPQKvvzizhI1RZv1g4Nbf8Iw2fTaA3 LtMLRK0M6e/ii9suSwk7BpI1qzu8J6NdqVO1agwGsKhHBOJTxdFjp3m25Zo3XU4RWz 8C84qOsOfvI00Pm1kYfCdqDuhQdciFA7ACfddh2w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391531AbgHQSsm (ORCPT ); Mon, 17 Aug 2020 14:48:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:42838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388012AbgHQPzE (ORCPT ); Mon, 17 Aug 2020 11:55:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C44F2072E; Mon, 17 Aug 2020 15:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679703; bh=aEs59r/tWiUmQw/L2vM83zIJrUO60M5LIbt0D1F46tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YlRY9TxP2sPQP5O2684XET4z0seXW0u1iMc2UMXy0nBb9J6zmI8u5RGStk3HWF/ZF PyzzWnChPaLuvdFQhuc+iXc9+V9BNOY9ztavDXfWv6+WoNJDcRuvsmH3kwG7i9ErCi Vip49Fp7MNuUZFdynSC0redW9AdBBxHXidGS08V0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yan-Hsuan Chuang , Kalle Valo , Sasha Levin Subject: [PATCH 5.7 288/393] rtw88: coex: only skip coex triggered by BT info Date: Mon, 17 Aug 2020 17:15:38 +0200 Message-Id: <20200817143833.591406861@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yan-Hsuan Chuang [ Upstream commit 3f194bd4ca1cd9b8eef34d37d562279dbeb80319 ] The coex mechanism used to skip upon the freeze flag is raised. That will cause the coex mechanism being skipped unexpectedly. Coex only wanted to keep the TDMA table from being changed by BT side. So, check the freeze and reason, if the coex reason is coming from BT info, skip it, to make sure the coex triggered by Wifi itself can work. This is required for the AP mode, while the control flow is different with STA mode. When starting an AP mode, the AP mode needs to start working immedaitely after leaving IPS, and the freeze flag could be raised. If the coex info is skipped, then the AP mode will not set the antenna owner, leads to TX stuck. Fixes: 4136214f7c46 ("rtw88: add BT co-existence support") Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-5-yhchuang@realtek.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/coex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c index 567372fb4e12e..c73101afbeddb 100644 --- a/drivers/net/wireless/realtek/rtw88/coex.c +++ b/drivers/net/wireless/realtek/rtw88/coex.c @@ -1920,7 +1920,8 @@ static void rtw_coex_run_coex(struct rtw_dev *rtwdev, u8 reason) if (coex_stat->wl_under_ips) return; - if (coex->freeze && !coex_stat->bt_setup_link) + if (coex->freeze && coex_dm->reason == COEX_RSN_BTINFO && + !coex_stat->bt_setup_link) return; coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN]++;