From patchwork Mon Apr 17 00:11:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9683357 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 2B850600F6 for ; Mon, 17 Apr 2017 00:11:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D02127D4D for ; Mon, 17 Apr 2017 00:11:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11AC027DA4; Mon, 17 Apr 2017 00:11:56 +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 59E4F27D4D for ; Mon, 17 Apr 2017 00:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932488AbdDQALx (ORCPT ); Sun, 16 Apr 2017 20:11:53 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33090 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457AbdDQALk (ORCPT ); Sun, 16 Apr 2017 20:11:40 -0400 Received: by mail-oi0-f65.google.com with SMTP id a189so588035oib.0 for ; Sun, 16 Apr 2017 17:11:40 -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=fco9uqvJ2fbIYtNC483XrLwGeBc1GNDUYY3QYbzTV4k=; b=Z2bQ5SiTU8F+/Y50uPnQvPKWiAyYD9mfHJ36BHYmGEHwYxWG/A8LCDn/mP7+NDLOYY nQcoszPK9qlNrLDchCKbKCUXfOkmdfcr707xDAEEPQcUWkAVVPFtiVkentJ5+YCZclVK ycof7Jd0X0u/STKGFAXQbcBMU0dq+UeUmFguISs4YDc1n6dpLcjF9sug2wzCAz3jsQHY rBkFxPuomhL3sIn8mrAMcz1oPOKcC4LCPo3WjTilP4ycZ/okdoblbdlbiyCdqXiIRTL1 jYLKLxmIP4oj8ojY04Dam62rwqWjOSbWHWiPlTESBRC0P2Ab2N5b4rLbM/wxjDQdHUjO 2deA== 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=fco9uqvJ2fbIYtNC483XrLwGeBc1GNDUYY3QYbzTV4k=; b=Sg/EXrMrwBK6HzWxUIkU1ApUNKlP5wiwP72nQN8q4UzFEKGzDMF4zKvqkbVUz35F82 1K8UbmuXcknwlZtjUDsWbV5SQLofXYrWkT/6ssxTsdgcNOMjgEv2yEcaF3AFoGI8Ntkm Jx3b8ll0QKtGDQM2Sv3/8iXW0Jzu2dKsKZzhEi9MpjWVq4pA7nl99dgWfHyMPH2N2Rgs 8t8ePVfNpCUW1rOL+RoFb056Jzp6ZW7lNjz5ah6QQf4+yd1DxVRd7MTAdhxhHcxTZr6s +BO9b+whvApAzEuQzaoV8Q26SQFzuAiY21/1pEHwK3QHiMhckp3jKPQhmiSpsVNw0C99 MtLw== X-Gm-Message-State: AN3rC/4dHYE9qayJy8w6wJrmrYtAuP3Ro7JzlcaSDygHuDTGzKxqlsvB joWZMlG1j84YdA== X-Received: by 10.202.241.67 with SMTP id p64mr3239533oih.143.1492387899795; Sun, 16 Apr 2017 17:11:39 -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 y38sm2788394oty.15.2017.04.16.17.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Apr 2017 17:11:39 -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 25/27] rtlwifi: btcoex: 23b 1ant: fine tune for wifi not connected Date: Sun, 16 Apr 2017 19:11:09 -0500 Message-Id: <20170417001111.29384-26-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170417001111.29384-1-Larry.Finger@lwfinger.net> References: <20170417001111.29384-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 Fine tune the parameters in cases of scan, assoc and auth when wifi isn't connected. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 37 ++++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c index a338b72aed95..0431cb41e1d1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c @@ -1887,7 +1887,9 @@ static void btc8723b1ant_action_wifi_not_conn(struct btc_coexist *btcoexist) 0x0, 0x0); /* tdma and coex table */ - halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); + halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, + false, false); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); } @@ -1901,16 +1903,16 @@ btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist) /* tdma and coex table */ if (coex_dm->bt_status == BT_8723B_1ANT_BT_STATUS_ACL_BUSY) { - if (bt_link_info->a2dp_exist && bt_link_info->pan_exist) { + if (bt_link_info->a2dp_exist) { halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, - true, 22); + true, 32); halbtc8723b1ant_coex_table_with_type(btcoexist, - NORMAL_EXEC, 1); - } else if (bt_link_info->pan_only) { + NORMAL_EXEC, 4); + } else if (bt_link_info->a2dp_exist) { halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, - true, 20); + true, 22); halbtc8723b1ant_coex_table_with_type(btcoexist, - NORMAL_EXEC, 2); + NORMAL_EXEC, 4); } else { halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); @@ -1923,6 +1925,8 @@ btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist) BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN); } else { halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, + NORMAL_EXEC, false, false); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); } } @@ -1935,14 +1939,19 @@ btc8723b1ant_act_wifi_not_conn_asso_auth(struct btc_coexist *btcoexist) halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - if ((BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == coex_dm->bt_status) || - (bt_link_info->sco_exist) || (bt_link_info->hid_only) || - (bt_link_info->a2dp_only) || (bt_link_info->pan_only)) { - halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); - } else { + /* tdma and coex table */ + if ((bt_link_info->sco_exist) || (bt_link_info->hid_exist) || + (bt_link_info->a2dp_exist)) { + halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); + } else if (bt_link_info->pan_exist) { halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); - halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); + halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); + } else { + halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, + NORMAL_EXEC, false, false); + halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2); } }