linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <yhchuang@realtek.com>, <ku920601@realtek.com>,
	<linux-wireless@vger.kernel.org>
Subject: [PATCH 06/10] rtw88: coex: change the coexistence mechanism for WLAN connected
Date: Wed, 25 Nov 2020 13:38:57 +0800	[thread overview]
Message-ID: <20201125053901.29678-7-pkshih@realtek.com> (raw)
In-Reply-To: <20201125053901.29678-1-pkshih@realtek.com>

From: Ching-Te Ku <ku920601@realtek.com>

Add a flag to make decision whether the mechanism
should go into free-run mode or not.
For now, it is always false, the flag assignment will
be implemented later.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/coex.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index 8ea5e115a81e..fc96641dd133 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -2179,6 +2179,7 @@ static void rtw_coex_action_wl_connected(struct rtw_dev *rtwdev)
 	struct rtw_coex_stat *coex_stat = &coex->stat;
 	struct rtw_coex_dm *coex_dm = &coex->dm;
 	struct rtw_efuse *efuse = &rtwdev->efuse;
+	bool freerun_check = false;
 	u8 algorithm;
 
 	/* Non-Shared-Ant */
@@ -2198,10 +2199,15 @@ static void rtw_coex_action_wl_connected(struct rtw_dev *rtwdev)
 		rtw_coex_action_bt_hfp(rtwdev);
 		break;
 	case COEX_ALGO_HID:
-		rtw_coex_action_bt_hid(rtwdev);
+		if (freerun_check)
+			rtw_coex_action_freerun(rtwdev);
+		else
+			rtw_coex_action_bt_hid(rtwdev);
 		break;
 	case COEX_ALGO_A2DP:
-		if (coex_stat->bt_a2dp_sink)
+		if (freerun_check)
+			rtw_coex_action_freerun(rtwdev);
+		else if (coex_stat->bt_a2dp_sink)
 			rtw_coex_action_bt_a2dpsink(rtwdev);
 		else
 			rtw_coex_action_bt_a2dp(rtwdev);
@@ -2210,7 +2216,10 @@ static void rtw_coex_action_wl_connected(struct rtw_dev *rtwdev)
 		rtw_coex_action_bt_pan(rtwdev);
 		break;
 	case COEX_ALGO_A2DP_HID:
-		rtw_coex_action_bt_a2dp_hid(rtwdev);
+		if (freerun_check)
+			rtw_coex_action_freerun(rtwdev);
+		else
+			rtw_coex_action_bt_a2dp_hid(rtwdev);
 		break;
 	case COEX_ALGO_A2DP_PAN:
 		rtw_coex_action_bt_a2dp_pan(rtwdev);
-- 
2.21.0


  parent reply	other threads:[~2020-11-25  5:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  5:38 [PATCH 00/10] rtw88: coex: enhance coex performance and synchronize coex code pkshih
2020-11-25  5:38 ` [PATCH 01/10] rtw88: coex: run coexistence when WLAN entering/leaving LPS pkshih
2020-11-25  5:38 ` [PATCH 02/10] rtw88: coex: add debug message pkshih
2020-11-25  5:38 ` [PATCH 03/10] rtw88: coex: update the mechanism for A2DP + PAN pkshih
2020-11-25  5:38 ` [PATCH 04/10] rtw88: coex: update AFH information while in free-run mode pkshih
2020-11-25  5:38 ` [PATCH 05/10] rtw88: coex: change the coexistence mechanism for HID pkshih
2020-11-25  5:38 ` pkshih [this message]
2020-11-25  5:38 ` [PATCH 07/10] rtw88: coex: add function to avoid cck lock pkshih
2020-11-25  5:38 ` [PATCH 08/10] rtw88: coex: add action for coexistence in hardware initial pkshih
2020-11-25  5:39 ` [PATCH 09/10] rtw88: coex: upgrade coexistence A2DP mechanism pkshih
2020-11-25  8:55   ` kernel test robot
2020-11-25  5:39 ` [PATCH 10/10] rtw88: coex: add feature to enhance HID coexistence performance pkshih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125053901.29678-7-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=ku920601@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yhchuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).