mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
wifi: rtw88: remove CPT execution branch never used
[ Upstream commit 77c977327dfaa9ae2e154964cdb89ceb5c7b7cf1 ]
In 'rtw_coex_action_bt_a2dp_pan', 'wl_cpt_test' and 'bt_cpt_test' are
hardcoded to false, so corresponding 'table_case' and 'tdma_case'
assignments are never met.
Also 'rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[1])' is never
executed. Assuming that CPT was never fully implemented, remove
lookalike leftovers. Compile tested only.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 76f631cb40 ("rtw88: coex: update the mechanism for A2DP + PAN")
Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240809085310.10512-1-d.kandybka@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
175407d614
commit
161a8becd0
@@ -2195,7 +2195,6 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev)
|
|||||||
struct rtw_coex_stat *coex_stat = &coex->stat;
|
struct rtw_coex_stat *coex_stat = &coex->stat;
|
||||||
struct rtw_efuse *efuse = &rtwdev->efuse;
|
struct rtw_efuse *efuse = &rtwdev->efuse;
|
||||||
u8 table_case, tdma_case;
|
u8 table_case, tdma_case;
|
||||||
bool wl_cpt_test = false, bt_cpt_test = false;
|
|
||||||
|
|
||||||
rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
|
rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
|
||||||
|
|
||||||
@@ -2203,29 +2202,16 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev)
|
|||||||
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
|
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
|
||||||
if (efuse->share_ant) {
|
if (efuse->share_ant) {
|
||||||
/* Shared-Ant */
|
/* Shared-Ant */
|
||||||
if (wl_cpt_test) {
|
if (coex_stat->wl_gl_busy &&
|
||||||
if (coex_stat->wl_gl_busy) {
|
coex_stat->wl_noisy_level == 0)
|
||||||
table_case = 20;
|
table_case = 14;
|
||||||
tdma_case = 17;
|
else
|
||||||
} else {
|
table_case = 10;
|
||||||
table_case = 10;
|
|
||||||
tdma_case = 15;
|
|
||||||
}
|
|
||||||
} else if (bt_cpt_test) {
|
|
||||||
table_case = 26;
|
|
||||||
tdma_case = 26;
|
|
||||||
} else {
|
|
||||||
if (coex_stat->wl_gl_busy &&
|
|
||||||
coex_stat->wl_noisy_level == 0)
|
|
||||||
table_case = 14;
|
|
||||||
else
|
|
||||||
table_case = 10;
|
|
||||||
|
|
||||||
if (coex_stat->wl_gl_busy)
|
if (coex_stat->wl_gl_busy)
|
||||||
tdma_case = 15;
|
tdma_case = 15;
|
||||||
else
|
else
|
||||||
tdma_case = 20;
|
tdma_case = 20;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* Non-Shared-Ant */
|
/* Non-Shared-Ant */
|
||||||
table_case = 112;
|
table_case = 112;
|
||||||
@@ -2236,11 +2222,7 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev)
|
|||||||
tdma_case = 120;
|
tdma_case = 120;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wl_cpt_test)
|
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
|
||||||
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[1]);
|
|
||||||
else
|
|
||||||
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
|
|
||||||
|
|
||||||
rtw_coex_table(rtwdev, false, table_case);
|
rtw_coex_table(rtwdev, false, table_case);
|
||||||
rtw_coex_tdma(rtwdev, false, tdma_case);
|
rtw_coex_tdma(rtwdev, false, tdma_case);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user