Skip to content

Commit efb9eee

Browse files
dmikandgregkh
authored andcommitted
wifi: rtw88: remove CPT execution branch never used
[ Upstream commit 77c9773 ] 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: 76f631c ("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>
1 parent 2c9c2d1 commit efb9eee

1 file changed

Lines changed: 10 additions & 28 deletions

File tree

  • drivers/net/wireless/realtek/rtw88

drivers/net/wireless/realtek/rtw88/coex.c

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,37 +2194,23 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev)
21942194
struct rtw_coex_stat *coex_stat = &coex->stat;
21952195
struct rtw_efuse *efuse = &rtwdev->efuse;
21962196
u8 table_case, tdma_case;
2197-
bool wl_cpt_test = false, bt_cpt_test = false;
21982197

21992198
rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
22002199

22012200
rtw_coex_set_ant_path(rtwdev, false, COEX_SET_ANT_2G);
22022201
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
22032202
if (efuse->share_ant) {
22042203
/* Shared-Ant */
2205-
if (wl_cpt_test) {
2206-
if (coex_stat->wl_gl_busy) {
2207-
table_case = 20;
2208-
tdma_case = 17;
2209-
} else {
2210-
table_case = 10;
2211-
tdma_case = 15;
2212-
}
2213-
} else if (bt_cpt_test) {
2214-
table_case = 26;
2215-
tdma_case = 26;
2216-
} else {
2217-
if (coex_stat->wl_gl_busy &&
2218-
coex_stat->wl_noisy_level == 0)
2219-
table_case = 14;
2220-
else
2221-
table_case = 10;
2204+
if (coex_stat->wl_gl_busy &&
2205+
coex_stat->wl_noisy_level == 0)
2206+
table_case = 14;
2207+
else
2208+
table_case = 10;
22222209

2223-
if (coex_stat->wl_gl_busy)
2224-
tdma_case = 15;
2225-
else
2226-
tdma_case = 20;
2227-
}
2210+
if (coex_stat->wl_gl_busy)
2211+
tdma_case = 15;
2212+
else
2213+
tdma_case = 20;
22282214
} else {
22292215
/* Non-Shared-Ant */
22302216
table_case = 112;
@@ -2235,11 +2221,7 @@ static void rtw_coex_action_bt_a2dp_pan(struct rtw_dev *rtwdev)
22352221
tdma_case = 120;
22362222
}
22372223

2238-
if (wl_cpt_test)
2239-
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[1]);
2240-
else
2241-
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
2242-
2224+
rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
22432225
rtw_coex_table(rtwdev, false, table_case);
22442226
rtw_coex_tdma(rtwdev, false, tdma_case);
22452227
}

0 commit comments

Comments
 (0)