From patchwork Sat May 20 15:48:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9738655 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 610846041F for ; Sat, 20 May 2017 15:49:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 520DB285E1 for ; Sat, 20 May 2017 15:49:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46BE22860D; Sat, 20 May 2017 15:49:22 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 D4678285E2 for ; Sat, 20 May 2017 15:49:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932317AbdETPtS (ORCPT ); Sat, 20 May 2017 11:49:18 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33984 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932292AbdETPtO (ORCPT ); Sat, 20 May 2017 11:49:14 -0400 Received: by mail-oi0-f68.google.com with SMTP id w10so16697350oif.1 for ; Sat, 20 May 2017 08:49:14 -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=wr3i60XpGuTf/Ut8Po5awG4fvPMoDslHnkaPIUuHfrU=; b=bFqxKJvsojnjjGJhDB8CevQivHc8TogHkpJZNsDJsojdd0WGNy1C5SvwuAmNXT3Aoj yj21ObJYQnG/akLLwpoVWA0vX/UKhkskBexJFL9iKVN+2EU/4rnNz8lKcwy+SSZ9t9Lw VGfe2E8p20j72bp60/OfxH45XvWfObSeuNbigBVUXGwLdyyMIuIB6I2qbBZhH8CdU2gG FRu/hgdIXsZdXngb59R8AT4/izi3UQ8Sc4c1s6kKtQmgjjrfVJDp8vV2u0ehReaF/ojQ OoF2xxQq633aCHm69lJQ0yd+zZbsELjNnpNl7bVzUsbALo4/kkYagR8cnW4FD0rB9MWv Zhvg== 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=wr3i60XpGuTf/Ut8Po5awG4fvPMoDslHnkaPIUuHfrU=; b=JPPjJ8AjLpCNLKzzOZHq6L3L5kGtkuAA/0myu0hoevm5CuRl/LcJD4JDUnVsBFSn5Z VmgxLqiTVTulR+G7cohCz79Lbt0oWitb/RPobZsByqsY8zjey8jyAugtIyxMoMiIpOKj dLQ/Vt5lPa7rCwJiPRqrdamaAlQrS5+NRpHXrRJ0SCL7nW1e0IyXa7aSoQZ0cfKXKP/E 81iNKHGVpElE8K4shTmWVBJFP9rWHFxDgRRHiKsK6Rl+B752BGTa4VBKU+OOFtj2zw3O lP140X6QKZYJRifcLhIWs/73ByB3BNy/GyANVWOdmsDbUVYLHF1ZQY4P08JHM3xI1+wq YG8g== X-Gm-Message-State: AODbwcCWAHs+jf7DG3TymvBAaLGXIWenRqe6wfGtmOYS/JAAJ8eBEE9K BB79ILKWAqeSzeWa X-Received: by 10.202.240.197 with SMTP id o188mr7650087oih.198.1495295353863; Sat, 20 May 2017 08:49:13 -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 130sm3617185oid.35.2017.05.20.08.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 May 2017 08:49:13 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Ping-Ke Shih , Larry Finger , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting Subject: [PATCH 02/10] rtlwifi: btcoex: 23b 1ant: define wifi in high priority task. Date: Sat, 20 May 2017 10:48:59 -0500 Message-Id: <20170520154907.15590-3-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170520154907.15590-1-Larry.Finger@lwfinger.net> References: <20170520154907.15590-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: Ping-Ke Shih Add the definition of wifi in high priority task for bt inquiry. According to driver's notifications, btc will knows whether wifi is in high priority tasks or not. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 15 +++++++++++++++ .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c index 188e248b2265..185046227d15 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c @@ -2662,6 +2662,7 @@ void ex_halbtc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type) return; if (type == BTC_SCAN_START) { + coex_sta->wifi_is_high_pri_task = true; RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], SCAN START notify\n"); /* Force antenna setup for no scan result issue */ @@ -2676,6 +2677,7 @@ void ex_halbtc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type) "[BTCoex], 0x948=0x%x, 0x765=0x%x, 0x67=0x%x\n", u32tmp, u8tmpa, u8tmpb); } else { + coex_sta->wifi_is_high_pri_task = false; RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], SCAN FINISH notify\n"); @@ -2748,6 +2750,8 @@ void ex_halbtc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) return; if (type == BTC_ASSOCIATE_START) { + coex_sta->wifi_is_high_pri_task = true; + /* Force antenna setup for no scan result issue */ halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, @@ -2756,6 +2760,7 @@ void ex_halbtc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) "[BTCoex], CONNECT START notify\n"); coex_dm->arp_cnt = 0; } else { + coex_sta->wifi_is_high_pri_task = false; RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], CONNECT FINISH notify\n"); } @@ -2906,11 +2911,21 @@ void ex_halbtc8723b1ant_special_packet_notify(struct btc_coexist *btcoexist, RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], ARP Packet Count = %d\n", coex_dm->arp_cnt); + + if ((coex_dm->arp_cnt >= 10) && (!under_4way)) + /* if APR PKT > 10 after connect, do not go to + * ActionWifiConnectedSpecificPacket(btcoexist) + */ + coex_sta->wifi_is_high_pri_task = false; + else + coex_sta->wifi_is_high_pri_task = true; } else { + coex_sta->wifi_is_high_pri_task = true; RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], special Packet DHCP or EAPOL notify\n"); } } else { + coex_sta->wifi_is_high_pri_task = false; RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], special Packet [Type = %d] notify\n", type); diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h index 8df1036e36f1..b71d4b40ab6c 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h @@ -166,6 +166,7 @@ struct coex_sta_8723b_1ant { bool bt_whck_test; bool c2h_bt_inquiry_page; bool c2h_bt_remote_name_req; + bool wifi_is_high_pri_task; u8 bt_retry_cnt; u8 bt_info_ext; u8 scan_ap_num;