public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script
@ 2023-02-28 20:28 Philipp Hortmann
  2023-03-08 16:06 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Hortmann @ 2023-02-28 20:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove function _rtl92e_dm_check_ac_dc_power calling a script
/etc/acpi/wireless-rtl-ac-dc-power.sh that is not available. This script
is not part of the kernel and it is not available on the www. The result
is that this function is just dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
I found a hint in this blog about the content of the script:
https://www.kubuntuforums.net/forum/archives/eol-releases/-9-10/network-
support-ai/41269-realtek-lan-connection-timeout

If you know more about the purpose and the need for this script please
respond.

Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 23 ----------------------
 1 file changed, 23 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index d8455b23e555..c04eb15c4044 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -185,7 +185,6 @@ static void _rtl92e_dm_init_fsync(struct net_device *dev);
 static void _rtl92e_dm_deinit_fsync(struct net_device *dev);
 
 static	void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev);
-static  void _rtl92e_dm_check_ac_dc_power(struct net_device *dev);
 static void _rtl92e_dm_check_fsync(struct net_device *dev);
 static void _rtl92e_dm_check_rf_ctrl_gpio(void *data);
 static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t);
@@ -236,8 +235,6 @@ void rtl92e_dm_watchdog(struct net_device *dev)
 	if (priv->being_init_adapter)
 		return;
 
-	_rtl92e_dm_check_ac_dc_power(dev);
-
 	_rtl92e_dm_check_txrateandretrycount(dev);
 	_rtl92e_dm_check_edca_turbo(dev);
 
@@ -255,26 +252,6 @@ void rtl92e_dm_watchdog(struct net_device *dev)
 	_rtl92e_dm_cts_to_self(dev);
 }
 
-static void _rtl92e_dm_check_ac_dc_power(struct net_device *dev)
-{
-	struct r8192_priv *priv = rtllib_priv(dev);
-	static const char ac_dc_script[] = "/etc/acpi/wireless-rtl-ac-dc-power.sh";
-	char *argv[] = {(char *)ac_dc_script, DRV_NAME, NULL};
-	static char *envp[] = {"HOME=/",
-			"TERM=linux",
-			"PATH=/usr/bin:/bin",
-			 NULL};
-
-	if (priv->rst_progress == RESET_TYPE_SILENT)
-		return;
-	if (priv->rtllib->state != RTLLIB_LINKED)
-		return;
-	call_usermodehelper(ac_dc_script, argv, envp, UMH_WAIT_PROC);
-
-	return;
-};
-
-
 void rtl92e_init_adaptive_rate(struct net_device *dev)
 {
 
-- 
2.39.2


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

* Re: [PATCH] staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script
  2023-02-28 20:28 [PATCH] staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script Philipp Hortmann
@ 2023-03-08 16:06 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-08 16:06 UTC (permalink / raw)
  To: Philipp Hortmann; +Cc: linux-staging, linux-kernel

On Tue, Feb 28, 2023 at 09:28:57PM +0100, Philipp Hortmann wrote:
> Remove function _rtl92e_dm_check_ac_dc_power calling a script
> /etc/acpi/wireless-rtl-ac-dc-power.sh that is not available. This script
> is not part of the kernel and it is not available on the www. The result
> is that this function is just dead code.
> 
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
> I found a hint in this blog about the content of the script:
> https://www.kubuntuforums.net/forum/archives/eol-releases/-9-10/network-
> support-ai/41269-realtek-lan-connection-timeout
> 
> If you know more about the purpose and the need for this script please
> respond.

Good catch, that shouldn't be there at all.

greg k-h

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

end of thread, other threads:[~2023-03-08 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 20:28 [PATCH] staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script Philipp Hortmann
2023-03-08 16:06 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox