linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: rtw88: coex: remove rf4ce unused code
@ 2024-08-20  5:52 Dmitry Kandybka
  2024-10-10  8:19 ` Dmitry Kandybka
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Kandybka @ 2024-08-20  5:52 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless, lvc-project, Dmitry Antipov

In 'rtw_coex_run_coex', 'rf4ce_en' is hardcoded to false,
so 'rtw_coex_action_rf4ce(rtwdev)' is never executed.
Assuming that rf4ce was never fully implemented,
remove lookalike leftovers. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: a9359faaa47d ("rtw88: coex: add the mechanism for RF4CE")
Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/coex.c | 30 +----------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c
index de3332eb7a22..1fbcf701e7b7 100644
--- a/drivers/net/wireless/realtek/rtw88/coex.c
+++ b/drivers/net/wireless/realtek/rtw88/coex.c
@@ -1591,31 +1591,6 @@ static void rtw_coex_action_freerun(struct rtw_dev *rtwdev)
 	rtw_coex_tdma(rtwdev, false, 100);
 }
 
-static void rtw_coex_action_rf4ce(struct rtw_dev *rtwdev)
-{
-	const struct rtw_chip_info *chip = rtwdev->chip;
-	struct rtw_efuse *efuse = &rtwdev->efuse;
-	u8 table_case, tdma_case;
-
-	rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
-
-	rtw_coex_set_ant_path(rtwdev, false, COEX_SET_ANT_2G);
-	rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
-
-	if (efuse->share_ant) {
-		/* Shared-Ant */
-		table_case = 9;
-		tdma_case = 16;
-	} else {
-		/* Non-Shared-Ant */
-		table_case = 100;
-		tdma_case = 100;
-	}
-
-	rtw_coex_table(rtwdev, false, table_case);
-	rtw_coex_tdma(rtwdev, false, tdma_case);
-}
-
 static void rtw_coex_action_bt_whql_test(struct rtw_dev *rtwdev)
 {
 	const struct rtw_chip_info *chip = rtwdev->chip;
@@ -2531,7 +2506,6 @@ static void rtw_coex_run_coex(struct rtw_dev *rtwdev, u8 reason)
 	struct rtw_coex *coex = &rtwdev->coex;
 	struct rtw_coex_dm *coex_dm = &coex->dm;
 	struct rtw_coex_stat *coex_stat = &coex->stat;
-	bool rf4ce_en = false;
 
 	lockdep_assert_held(&rtwdev->mutex);
 
@@ -2587,9 +2561,7 @@ static void rtw_coex_run_coex(struct rtw_dev *rtwdev, u8 reason)
 	coex_stat->wl_coex_mode = COEX_WLINK_2G1PORT;
 
 	if (coex_stat->bt_disabled) {
-		if (coex_stat->wl_connected && rf4ce_en)
-			rtw_coex_action_rf4ce(rtwdev);
-		else if (!coex_stat->wl_connected)
+		if (!coex_stat->wl_connected)
 			rtw_coex_action_wl_not_connected(rtwdev);
 		else
 			rtw_coex_action_wl_only(rtwdev);
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: rtw88: coex: remove rf4ce unused code
  2024-08-20  5:52 [PATCH] wifi: rtw88: coex: remove rf4ce unused code Dmitry Kandybka
@ 2024-10-10  8:19 ` Dmitry Kandybka
  2024-10-11  0:26   ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Kandybka @ 2024-10-10  8:19 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless, lvc-project, Dmitry Antipov

On Tue, 2024-08-20 at 08:52 +0300, Dmitry Kandybka wrote:
> In 'rtw_coex_run_coex', 'rf4ce_en' is hardcoded to false,
> so 'rtw_coex_action_rf4ce(rtwdev)' is never executed.
> Assuming that rf4ce was never fully implemented,
> remove lookalike leftovers. Compile tested only.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: a9359faaa47d ("rtw88: coex: add the mechanism for RF4CE")
> Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
> ---
>  drivers/net/wireless/realtek/rtw88/coex.c | 30 +----------------------
>  1 file changed, 1 insertion(+), 29 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/coex.c
> b/drivers/net/wireless/realtek/rtw88/coex.c
> index de3332eb7a22..1fbcf701e7b7 100644
> --- a/drivers/net/wireless/realtek/rtw88/coex.c
> +++ b/drivers/net/wireless/realtek/rtw88/coex.c
> @@ -1591,31 +1591,6 @@ static void rtw_coex_action_freerun(struct rtw_dev
> *rtwdev)
>  	rtw_coex_tdma(rtwdev, false, 100);
>  }
>  
> -static void rtw_coex_action_rf4ce(struct rtw_dev *rtwdev)
> -{
> -	const struct rtw_chip_info *chip = rtwdev->chip;
> -	struct rtw_efuse *efuse = &rtwdev->efuse;
> -	u8 table_case, tdma_case;
> -
> -	rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
> -
> -	rtw_coex_set_ant_path(rtwdev, false, COEX_SET_ANT_2G);
> -	rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
> -
> -	if (efuse->share_ant) {
> -		/* Shared-Ant */
> -		table_case = 9;
> -		tdma_case = 16;
> -	} else {
> -		/* Non-Shared-Ant */
> -		table_case = 100;
> -		tdma_case = 100;
> -	}
> -
> -	rtw_coex_table(rtwdev, false, table_case);
> -	rtw_coex_tdma(rtwdev, false, tdma_case);
> -}
> -
>  static void rtw_coex_action_bt_whql_test(struct rtw_dev *rtwdev)
>  {
>  	const struct rtw_chip_info *chip = rtwdev->chip;
> @@ -2531,7 +2506,6 @@ static void rtw_coex_run_coex(struct rtw_dev
> *rtwdev, u8 reason)
>  	struct rtw_coex *coex = &rtwdev->coex;
>  	struct rtw_coex_dm *coex_dm = &coex->dm;
>  	struct rtw_coex_stat *coex_stat = &coex->stat;
> -	bool rf4ce_en = false;
>  
>  	lockdep_assert_held(&rtwdev->mutex);
>  
> @@ -2587,9 +2561,7 @@ static void rtw_coex_run_coex(struct rtw_dev
> *rtwdev, u8 reason)
>  	coex_stat->wl_coex_mode = COEX_WLINK_2G1PORT;
>  
>  	if (coex_stat->bt_disabled) {
> -		if (coex_stat->wl_connected && rf4ce_en)
> -			rtw_coex_action_rf4ce(rtwdev);
> -		else if (!coex_stat->wl_connected)
> +		if (!coex_stat->wl_connected)
>  			rtw_coex_action_wl_not_connected(rtwdev);
>  		else
>  			rtw_coex_action_wl_only(rtwdev);
Hello Ping-Ke Shih,
This is kindly reminder. Could you pay some attention to this patch and
clarify if the rf4ce is actual for this moment and future?
-- 
Best regards,
Dmitry Kandybka

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] wifi: rtw88: coex: remove rf4ce unused code
  2024-10-10  8:19 ` Dmitry Kandybka
@ 2024-10-11  0:26   ` Ping-Ke Shih
  2024-10-11  6:45     ` Dmitry Kandybka
  2024-10-15  9:59     ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-10-11  0:26 UTC (permalink / raw)
  To: Dmitry Kandybka
  Cc: linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org,
	Dmitry Antipov


> This is kindly reminder. Could you pay some attention to this patch and
> clarify if the rf4ce is actual for this moment and future?

Yes. Our coex developers want to keep this chunk. For me, this kind of cleanup
patch is not very help to driver, but I and developers need much time to
confirm and judge if we keep or remove them, so I would want to ignore this
kind of patches... 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: rtw88: coex: remove rf4ce unused code
  2024-10-11  0:26   ` Ping-Ke Shih
@ 2024-10-11  6:45     ` Dmitry Kandybka
  2024-10-15  9:59     ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Kandybka @ 2024-10-11  6:45 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org,
	Dmitry Antipov

On Fri, 2024-10-11 at 00:26 +0000, Ping-Ke Shih wrote:
> 
> > This is kindly reminder. Could you pay some attention to this patch and
> > clarify if the rf4ce is actual for this moment and future?
> 
> Yes. Our coex developers want to keep this chunk. For me, this kind of
> cleanup
> patch is not very help to driver, but I and developers need much time to
> confirm and judge if we keep or remove them, so I would want to ignore
> this
> kind of patches... 
> 
> 
Thanks for you clarification. Have a good work on driver.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: rtw88: coex: remove rf4ce unused code
  2024-10-11  0:26   ` Ping-Ke Shih
  2024-10-11  6:45     ` Dmitry Kandybka
@ 2024-10-15  9:59     ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2024-10-15  9:59 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: Dmitry Kandybka, linux-wireless@vger.kernel.org,
	lvc-project@linuxtesting.org, Dmitry Antipov

Ping-Ke Shih <pkshih@realtek.com> writes:

>> This is kindly reminder. Could you pay some attention to this patch and
>> clarify if the rf4ce is actual for this moment and future?
>
> Yes. Our coex developers want to keep this chunk. For me, this kind of cleanup
> patch is not very help to driver, but I and developers need much time to
> confirm and judge if we keep or remove them, so I would want to ignore this
> kind of patches... 

Yeah, I share your pain. Cleanup patches are most of the time
unnecessary extra work for us maintainers. We should try to write that
"cleanup policy for wireless subsystem" doc at some point, then we could
just point that to everyone submitting cleanup patches.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-15  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  5:52 [PATCH] wifi: rtw88: coex: remove rf4ce unused code Dmitry Kandybka
2024-10-10  8:19 ` Dmitry Kandybka
2024-10-11  0:26   ` Ping-Ke Shih
2024-10-11  6:45     ` Dmitry Kandybka
2024-10-15  9:59     ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).