diff mbox series

[02/11] rtw88: coex: remove unnecessary feature/function

Message ID 20201111022108.9834-3-pkshih@realtek.com
State New
Headers show
Series rtw88: coex: fix and update settings to enhance coex performance | expand

Commit Message

Ping-Ke Shih Nov. 11, 2020, 2:20 a.m. UTC
From: Ching-Te Ku <ku920601@realtek.com>

It is redundant to update WLAN RSSI, remove the update WLAN RSSI part.
Remove unused function.

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 | 33 +++++++----------------
 1 file changed, 10 insertions(+), 23 deletions(-)

Comments

Ping-Ke Shih Nov. 12, 2020, 2:25 a.m. UTC | #1
> -----Original Message-----

> From: kvalo=codeaurora.org@mg.codeaurora.org [mailto:kvalo=codeaurora.org@mg.codeaurora.org] On

> Behalf Of Kalle Valo

> Sent: Wednesday, November 11, 2020 4:36 PM

> To: Pkshih

> Cc: tony0620emma@gmail.com; linux-wireless@vger.kernel.org

> Subject: Re: [PATCH 02/11] rtw88: coex: remove unnecessary feature/function

> 

> <pkshih@realtek.com> writes:

> 

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

> >

> > It is redundant to update WLAN RSSI, remove the update WLAN RSSI part.

> > Remove unused function.

> 

> Why is it redundant? The "Why?" is the most important part of the commit

> log.

> 


Will describe "why' in v2. Thanks.

---
Ping-Ke
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index 141aaa60c805..3a26453f4316 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -398,15 +398,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;
+		}
 	}
 }
 
@@ -613,15 +614,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;
@@ -992,7 +984,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, 3);
 	else
 		rtw_coex_tdma_timer_base(rtwdev, 0);
@@ -2865,11 +2857,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);
 }