Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1764159ybh; Thu, 16 Jul 2020 23:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmiXLJnzrpEzR8hS21icDv7RYm3VieeAqLrCWzitTv5KaM+YqagN3QW+0ygh8ef8nKcVX9 X-Received: by 2002:a17:906:2318:: with SMTP id l24mr7614014eja.291.1594968647054; Thu, 16 Jul 2020 23:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594968647; cv=none; d=google.com; s=arc-20160816; b=HHgW4k/YchocsepEJ/HKZajUjObibszv7CGGZQgEXLchcPYIqN9XeUho57yYqybS/p cSTYSr6V7Wlhgw3YDi+8xClMJJh8TQ8JE252sQ7uFBEoVQNwGkk9AW+osuz1e1cwWO18 j0nEY3dwZQOw99++olO0UNIDdCul5v531zPA9hkP5mguIJrdZG6dzZCFAYXSzdS32W6u 3feVXGyDUGUERF7mef+dwfnbjTHIC2orj/oXcuOfiwdwrWOdrznfcrMlQV4VBefnj9I1 PoHtA0vERil+biTXHoS78dNaTQxt1jwe8e411OVVdCHyF41loyzjKmVn8htFTEovUlV0 1SLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=VXeUxaOH5dqKkB/2AwUbZzH5y8lzZsM0DD4/HHoJtAM=; b=HGj+un0cCOcfgacKWNSnsDXswWnklZ0SEgDlKqxCtOjr1lIaJJUe+SRa9xhqeGTh+A enOLFhDDWEPjNRXRUUlURLwqXZTnqWbYi8oIzZll7R5tarI8wQvynNhcuabJFS9j0q9Q GlKAy12++r4K096xB1dtIqeeDHwWKyJIHStQX6G6aXY55KMTqtOdoNDzjdtBk4DgEtVw 0uCcICcltnaO/XALagi+6112pUxRgkZkTSc75T6AE3g6qfuPJK+cOolcSFLY9mBslwZg IBf7B5dPCC75/VwQeCQCdNjS0mMhxqJTEOaPQaXHrLcGYShRJ74kXIHjdmFoS5X0W2De MXtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rk8si4581064ejb.578.2020.07.16.23.50.11; Thu, 16 Jul 2020 23:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbgGQGuG (ORCPT + 99 others); Fri, 17 Jul 2020 02:50:06 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:55021 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726656AbgGQGuF (ORCPT ); Fri, 17 Jul 2020 02:50:05 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.69 with qID 06H6o0Mx9028960, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexmb06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.66/5.86) with ESMTPS id 06H6o0Mx9028960 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 17 Jul 2020 14:50:00 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 17 Jul 2020 14:50:00 +0800 Received: from localhost.localdomain (172.21.68.128) by RTEXMB04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 17 Jul 2020 14:49:59 +0800 From: To: CC: Subject: [PATCH 4/7] rtw88: coex: only skip coex triggered by BT info Date: Fri, 17 Jul 2020 14:49:34 +0800 Message-ID: <20200717064937.27966-5-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200717064937.27966-1-yhchuang@realtek.com> References: <20200717064937.27966-1-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.128] X-ClientProxiedBy: RTEXMB02.realtek.com.tw (172.21.6.95) To RTEXMB04.realtek.com.tw (172.21.6.97) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang 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 --- 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 3abae32341c4..aa08fd7d9fcd 100644 --- a/drivers/net/wireless/realtek/rtw88/coex.c +++ b/drivers/net/wireless/realtek/rtw88/coex.c @@ -1962,7 +1962,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.17.1