All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Yan-Hsuan Chuang <yhchuang@realtek.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Pkshih <pkshih@realtek.com>, Birming Chiu <birming@realtek.com>,
	Shaofu <shaofu@realtek.com>, Steven Ting <steventing@realtek.com>
Subject: [PATCH v2 06/10] rtlwifi: btcoex: 21a 2ant: run mechanism if status changes or auto adjust is set
Date: Fri,  5 May 2017 11:17:08 -0500	[thread overview]
Message-ID: <20170505161712.8685-7-Larry.Finger@lwfinger.net> (raw)
In-Reply-To: <20170505161712.8685-1-Larry.Finger@lwfinger.net>

From: Yan-Hsuan Chuang <yhchuang@realtek.com>

The driver will periodically ask the coex, and the coex only runs the
mechanism when the status was changed or the auto adjust is set.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
v2 - resubmit after removal of BT_AUTO_REPORT_XXXX symbols.
---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
index ca7649dca352..56972d36fe84 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
@@ -3485,14 +3485,14 @@ static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
 	if (btc8821a2ant_is_common_action(btcoexist)) {
 		RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
 			 "[BTCoex], Action 2-Ant common\n");
-		coex_dm->reset_tdma_adjust = true;
+		coex_dm->auto_tdma_adjust = true;
 	} else {
 		if (coex_dm->cur_algorithm != coex_dm->pre_algorithm) {
 			RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
 				 "[BTCoex], pre_algorithm = %d, cur_algorithm = %d\n",
 				    coex_dm->pre_algorithm,
 				    coex_dm->cur_algorithm);
-			coex_dm->reset_tdma_adjust = true;
+			coex_dm->auto_tdma_adjust = false;
 		}
 		switch (coex_dm->cur_algorithm) {
 		case BT_8821A_2ANT_COEX_ALGO_SCO:
@@ -4200,7 +4200,14 @@ void ex_btc8821a2ant_periodical(struct btc_coexist *btcoexist)
 			 "[BTCoex], ****************************************************************\n");
 	}
 
+#ifdef BT_AUTO_REPORT_ONLY_8821A_2ANT
 	btc8821a2ant_query_bt_info(btcoexist);
+#else
 	btc8821a2ant_monitor_bt_ctr(btcoexist);
 	btc8821a2ant_monitor_wifi_ctr(btcoexist);
+
+	if (btc8821a2ant_is_wifi_status_changed(btcoexist) ||
+	    coex_dm->auto_tdma_adjust)
+		btc8821a2ant_run_coexist_mechanism(btcoexist);
+#endif
 }
-- 
2.12.2

  parent reply	other threads:[~2017-05-05 16:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 16:17 [PATCH v2 00/10] rtlwifi: btcoex: Third set of changes for rtl8821ae 2ant Larry Finger
2017-05-05 16:17 ` [PATCH v2 01/10] rtlwifi: btcoex: 21a 2ant: set tdma with rssi states Larry Finger
2017-05-05 16:17 ` [PATCH v2 02/10] rtlwifi: btcoex: 21a 2ant: refine btc8821a2ant_action_hid_a2dp Larry Finger
2017-05-05 16:17 ` [PATCH v2 03/10] rtlwifi: btcoex: 21a 2ant: set wifi standby when halting of entering ips Larry Finger
2017-05-05 16:17 ` [PATCH v2 04/10] rtlwifi: btcoex: 21a 2ant: settings before wifi firmware is ready Larry Finger
2017-05-05 16:17 ` [PATCH v2 05/10] rtlwifi: btcoex: 21a 2ant: add pnp notidy to avoid LPS/IPS mismatch Larry Finger
2017-05-05 16:17 ` Larry Finger [this message]
2017-05-11 11:54   ` [PATCH v2 06/10] rtlwifi: btcoex: 21a 2ant: run mechanism if status changes or auto adjust is set Kalle Valo
2017-05-11 19:07     ` Larry Finger
2017-05-05 16:17 ` [PATCH v2 07/10] rtlwifi: btcoex: 21a 2ant: init wlan when leave ips Larry Finger
2017-05-05 16:17 ` [PATCH v2 08/10] rtlwifi: btcoex: 21a 2ant: refine bt info notify to have more profilings Larry Finger
2017-05-11 11:56   ` Kalle Valo
2017-05-05 16:17 ` [PATCH v2 09/10] rtlwifi: btcoex: 21a 2ant: fix PTA unstable problem when hw init Larry Finger
2017-05-05 16:17 ` [PATCH v2 10/10] rtlwifi: btcoex: 21a 2ant: remove unused antenna detection variables Larry Finger

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=20170505161712.8685-7-Larry.Finger@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=birming@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=shaofu@realtek.com \
    --cc=steventing@realtek.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.