[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1605367343-11770-1-git-send-email-kaixuxia@tencent.com>
Date: Sat, 14 Nov 2020 23:22:23 +0800
From: xiakaixu1987@...il.com
To: yhchuang@...ltek.com, kvalo@...eaurora.org
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
Kaixu Xia <kaixuxia@...cent.com>
Subject: [PATCH] rtw88: coex: remove the unreached code in rtw_coex_set_tdma
From: Kaixu Xia <kaixuxia@...cent.com>
The value of the bool variable ap_enable is always false, so the first
if branch is unreached code. Remove it.
Reported-by: Tosk Robot <tencent_os_robot@...cent.com>
Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>
---
drivers/net/wireless/realtek/rtw88/coex.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index aa08fd7d9fcd..9c7963e45755 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -863,18 +863,8 @@ static void rtw_coex_set_tdma(struct rtw_dev *rtwdev, u8 byte1, u8 byte2,
struct rtw_coex_dm *coex_dm = &coex->dm;
struct rtw_chip_info *chip = rtwdev->chip;
u8 ps_type = COEX_PS_WIFI_NATIVE;
- bool ap_enable = false;
-
- if (ap_enable && (byte1 & BIT(4) && !(byte1 & BIT(5)))) {
- byte1 &= ~BIT(4);
- byte1 |= BIT(5);
-
- byte5 |= BIT(5);
- byte5 &= ~BIT(6);
- ps_type = COEX_PS_WIFI_NATIVE;
- rtw_coex_power_save_state(rtwdev, ps_type, 0x0, 0x0);
- } else if (byte1 & BIT(4) && !(byte1 & BIT(5))) {
+ if (byte1 & BIT(4) && !(byte1 & BIT(5))) {
if (chip->pstdma_type == COEX_PSTDMA_FORCE_LPSOFF)
ps_type = COEX_PS_LPS_OFF;
else
--
2.20.0
Powered by blists - more mailing lists