Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2657760pxa; Mon, 17 Aug 2020 15:44:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp9gn46pLavmjIW20cbLwSRUbAZHwmECX409iPlNG/ZlA3mtqAg6yEVGVIzCvKGS4in/sy X-Received: by 2002:a50:d9c6:: with SMTP id x6mr17592770edj.56.1597704244137; Mon, 17 Aug 2020 15:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704244; cv=none; d=google.com; s=arc-20160816; b=igObZZfyGEtraJUcGoPPb8n2utq09ekfdhIMiuLRozJxs/vX8IaiCrOiU1vF8/CGM0 +GIsRrLOVBmqwD2cr3b8UqqbUSU2N/mFr7DBocvKZqsfInirX5g01T2DW+anUwGmurig cAK3LaDIXzTv7Q2CJZkeRa77od17HxkMpPS9neNqw6o/QgWaQqxAh6S68a8NoiEgkrE0 SEmDGJkhBWfS6fdUtpozRFaxmv8wqd3930BUTCcTvQL9cnGrEYXCm++Rjm3+q9gM7Chq 0qaMLH8C/ui+oalue95yypophDoiCR87TMqANEWnWiLlnKqKnGS1X9/B6EpZKXe3ItEm 8eDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=47JMzZyI3/U6SWcwIa4lmYQyp96cgEVOUGzd8fCtT94=; b=PMxeMnVFXeE3CDS5TIFmA0corNeRL7ldv1xwaxWfkfA6YmWCZ60mfyrSb2fUC5r+KM TBF+N5BkaFK48mOByjkkdnWH6mA//OEFtiqf3ATDF9wgCoS5nOtrR5M5RwPtP7jgJiIt 1lFjsGFYUEVZh4oojCkO7geiVaVbyNjKeZAV0q0yrNn7byvwkJREgoBs0GMpkvnngxbC en/rvNWceWTNWT3kqBqScRmxioT4ROmChtiYEangbbCRnc3hDZC4DdQZeH5oRWnCAEFP IXzxTrgCOHFfJ4lLTYo9bSCrhlRqc03VElF1P2nb2P+r9NzBGJaO5zSc3HgQ/tFWLCRn sZ4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YlRY9TxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si11824539ejv.339.2020.08.17.15.43.40; Mon, 17 Aug 2020 15:44:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YlRY9TxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391676AbgHQSsq (ORCPT + 99 others); Mon, 17 Aug 2020 14:48:46 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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]++; -- 2.25.1