All of lore.kernel.org
 help / color / mirror / Atom feed
From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>, <tony0620emma@gmail.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH v2 02/11] rtw88: coex: remove unnecessary feature/function
Date: Thu, 12 Nov 2020 11:14:21 +0800	[thread overview]
Message-ID: <20201112031430.4846-3-pkshih@realtek.com> (raw)
In-Reply-To: <20201112031430.4846-1-pkshih@realtek.com>

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

Because the WLAN RSSI report feature had been implemented at WLAN link info
update function, it is redundant to update WLAN RSSI while BT is updating
link info, so remove the update WLAN RSSI part.

Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
v2: describe "why" in log
---
 drivers/net/wireless/realtek/rtw88/coex.c | 33 +++++++----------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index 50df2e1b4842..f0d300e197b7 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -397,15 +397,16 @@ static void rtw_coex_monitor_bt_enable(struct rtw_dev *rtwdev)
 		coex_stat->bt_disabled = bt_disabled;
 		coex_stat->bt_ble_scan_type = 0;
 		coex_dm->cur_bt_lna_lvl = 0;
-	}
 
-	if (!coex_stat->bt_disabled) {
-		coex_stat->bt_reenable = true;
-		ieee80211_queue_delayed_work(rtwdev->hw,
-					     &coex->bt_reenable_work, 15 * HZ);
-	} else {
-		coex_stat->bt_mailbox_reply = false;
-		coex_stat->bt_reenable = false;
+		if (!coex_stat->bt_disabled) {
+			coex_stat->bt_reenable = true;
+			ieee80211_queue_delayed_work(rtwdev->hw,
+						     &coex->bt_reenable_work,
+						     15 * HZ);
+		} else {
+			coex_stat->bt_mailbox_reply = false;
+			coex_stat->bt_reenable = false;
+		}
 	}
 }
 
@@ -612,15 +613,6 @@ static void rtw_coex_update_bt_link_info(struct rtw_dev *rtwdev)
 		coex_dm->bt_rssi_state[i] = rssi_state;
 	}
 
-	for (i = 0; i < COEX_RSSI_STEP; i++) {
-		rssi_state = coex_dm->wl_rssi_state[i];
-		rssi_step = chip->wl_rssi_step[i];
-		rssi = rtwdev->dm_info.min_rssi;
-		rssi_state = rtw_coex_next_rssi_state(rtwdev, rssi_state,
-						      rssi, rssi_step);
-		coex_dm->wl_rssi_state[i] = rssi_state;
-	}
-
 	if (coex_stat->bt_ble_scan_en &&
 	    coex_stat->cnt_bt[COEX_CNT_BT_INFOUPDATE] % 3 == 0) {
 		u8 scan_type;
@@ -991,7 +983,7 @@ static void rtw_coex_tdma(struct rtw_dev *rtwdev, bool force, u32 tcase)
 	bool turn_on;
 	bool wl_busy = false;
 
-	if (tcase & TDMA_4SLOT)/* 4-slot (50ms) mode */
+	if (tcase & TDMA_4SLOT) /* 4-slot (50ms) mode */
 		rtw_coex_tdma_timer_base(rtwdev, TDMA_TIMER_TYPE_4SLOT);
 	else
 		rtw_coex_tdma_timer_base(rtwdev, TDMA_TIMER_TYPE_2SLOT);
@@ -2864,11 +2856,6 @@ void rtw_coex_wl_fwdbginfo_notify(struct rtw_dev *rtwdev, u8 *buf, u8 length)
 
 void rtw_coex_wl_status_change_notify(struct rtw_dev *rtwdev, u32 type)
 {
-	struct rtw_coex *coex = &rtwdev->coex;
-
-	if (coex->stop_dm)
-		return;
-
 	rtw_coex_run_coex(rtwdev, COEX_RSN_WLSTATUS);
 }
 
-- 
2.21.0


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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12  3:14 [PATCH v2 00/11] rtw88: coex: fix and update settings to enhance coex performance pkshih
2020-11-12  3:14 ` [PATCH v2 01/11] rtw88: coex: update TDMA settings for different beacon interval pkshih
2020-11-24  9:17   ` Kalle Valo
2020-11-12  3:14 ` pkshih [this message]
2020-11-12  3:14 ` [PATCH v2 03/11] rtw88: coex: add write scoreboard action when WLAN in critical procedure pkshih
2020-11-12  3:14 ` [PATCH v2 04/11] rtw88: coex: Add force flag for coexistence table function pkshih
2020-11-12  3:14 ` [PATCH v2 05/11] rtw88: coex: add the mechanism for RF4CE pkshih
2020-11-12  3:14 ` [PATCH v2 06/11] rtw88: coex: update the TDMA parameter when leave LPS pkshih
2020-11-12  3:14 ` [PATCH v2 07/11] rtw88: coex: Change antenna setting to enhance free-run performance pkshih
2020-11-12  3:14 ` [PATCH v2 08/11] rtw88: coex: fix BT performance drop during initial/power-on step pkshih
2020-11-12  3:14 ` [PATCH v2 09/11] rtw88: coex: remove write scan bit to scoreboard in scan and connect notify pkshih
2020-11-12  3:14 ` [PATCH v2 10/11] rtw88: coex: remove unnecessary WLAN slot extend pkshih
2020-11-12  3:14 ` [PATCH v2 11/11] rtw88: coex: change the decode method from firmware 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=20201112031430.4846-3-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tony0620emma@gmail.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.