From patchwork Sat Apr 15 20:32:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9682465 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 EBAD460138 for ; Sat, 15 Apr 2017 20:32:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE5DA282E8 for ; Sat, 15 Apr 2017 20:32:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2FAA28334; Sat, 15 Apr 2017 20:32:36 +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=-4.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID, URIBL_BLACK 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 827EE282E8 for ; Sat, 15 Apr 2017 20:32:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755352AbdDOUce (ORCPT ); Sat, 15 Apr 2017 16:32:34 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36384 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754981AbdDOUcT (ORCPT ); Sat, 15 Apr 2017 16:32:19 -0400 Received: by mail-oi0-f65.google.com with SMTP id b187so22211095oif.3 for ; Sat, 15 Apr 2017 13:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OhyYXALlufOnbbCmpp+hBPGyq0mtUngyj/55fiuk6FQ=; b=Pw85Mq0LDooqYzz9zzXYLhkEANh30+jTW+GQlfGZw1XOggYiClt/zfB9TkLKY8ZwHS g83uiz02C2EfQQNZYNBS8qGZZzOTRl58TV2NYUHUhiqvphAb1mzPA8PDjA3oK4dRnhgS 3a0QY8XBQ7pPxKRlxLZ3PQnMgPRr3K+9OvG7JM5BKATx+ISttNWINIzAu3a1XaWpwyID G9QwnoPA4U4dYeCaq72QoYsxfLnKWfDmw+a5chzaexnw1ZMeDkVHoQK9bn4dr+HvyD+x fVihr9m3BQUiZuegovF6EALMqKBuys1FHoW0IZggbO+wonPL4vvnTWU/Oea5OimL9Upq H0Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OhyYXALlufOnbbCmpp+hBPGyq0mtUngyj/55fiuk6FQ=; b=RPn9hHX7+Os5dTXUFItUdE8gFVr6ILqIeafSKw25UZ+xDGUC3J6IPnUUD3nu1459up +4pDXtcrN1mM/8aYZR0uSZl+VturhJN6PsZ33OC7Ip5wgsba8LofZspjHneGmlzg99tw Y4agCwBE2P9OP2S4hfj6teS8vaFH5/AuoKeg6Hsdp7cEarZp0TF4veM6riiPk2bVlj2g eOxTwhP5WZpElrTNRMQgO5wmmxe+t/SUYFmRXAycQxQM6F5+KDN1oPssV/ytM2Hnc29y UQGBUDfG8axovD1bKi0ItyIunLP1HBYVoo7+Zg6Q+qqfmmwZTeVYIbc11/NOT3Fr0dOC f85g== X-Gm-Message-State: AN3rC/4Fp3930sMfWD+O+rXjCdUhv1A9vWbHhueky3BPsBFWCLnFJsUP gH2ONXdKvTy2Wg== X-Received: by 10.202.235.199 with SMTP id j190mr1442752oih.206.1492288338632; Sat, 15 Apr 2017 13:32:18 -0700 (PDT) Received: from linux-4v1g.suse (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id d38sm2551653otc.5.2017.04.15.13.32.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Apr 2017 13:32:18 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Yan-Hsuan Chuang , Larry Finger , Pkshih , Birming Chiu , Shaofu Subject: [PATCH 14/14] rtlwifi: btcoex: 21a 2ant: wifi is linking action Date: Sat, 15 Apr 2017 15:32:00 -0500 Message-Id: <20170415203200.22979-15-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170415203200.22979-1-Larry.Finger@lwfinger.net> References: <20170415203200.22979-1-Larry.Finger@lwfinger.net> 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: Yan-Hsuan Chuang When wifi is under scanning/linking/roaming, do not run the reset of the coex mechanism because these activities are important for wifi, just run the linking process and return. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu --- .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c index 0aa36247e402..841b4a83ab70 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c @@ -3467,6 +3467,7 @@ static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) u32 num_of_wifi_link = 0; u32 wifi_link_status = 0; bool miracast_plus_bt = false; + bool scan = false, link = false, roam = false; if (btcoexist->manual_control) { RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, @@ -3498,6 +3499,17 @@ static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) return; } + btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); + btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); + btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); + + if (scan || link || roam) { + RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, + "[BTCoex], WiFi is under Link Process !!\n"); + btc8821a2ant_action_wifi_link_process(btcoexist); + return; + } + /* for P2P */ btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifi_link_status);