summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2021-04-19 23:11:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-22 11:42:23 +0300
commit2a743d94ebff4fccacd29ad3630afc6347eb9b3b (patch)
tree78281af1e7bf5e97eff9888c3c6a69c688bc0f9d /drivers
parent8a24201f824a7daee44662b412042f74ce46145b (diff)
downloadlinux-2a743d94ebff4fccacd29ad3630afc6347eb9b3b.tar.xz
staging: rtl8188eu: remove constant variable and dead code
g_wifi_on is always true. Remove the variable and the code that would be run only if g_wifi_on was false. While at it, remove a pointlesss comment that starts with /** and is misinterpreted as a kernel-doc comment. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210419201126.25633-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/rtw_android.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/rtw_android.c b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
index f5763a9d70c5..f1470ac56874 100644
--- a/drivers/staging/rtl8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
@@ -52,16 +52,6 @@ struct android_wifi_priv_cmd {
int total_len;
};
-/**
- * Local (static) functions and variables
- */
-
-/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first
- * time (only) in dhd_open, subsequential wifi on will be handled by
- * wl_android_wifi_on
- */
-static int g_wifi_on = true;
-
int rtw_android_cmdstr_to_num(char *cmdstr)
{
int cmd_num;
@@ -154,12 +144,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
case ANDROID_WIFI_CMD_SETFWPATH:
goto response;
}
- if (!g_wifi_on) {
- DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
- __func__, command, ifr->ifr_name);
- ret = 0;
- goto free;
- }
switch (cmd_num) {
case ANDROID_WIFI_CMD_STOP:
break;
@@ -244,7 +228,6 @@ response:
} else {
ret = bytes_written;
}
-free:
kfree(command);
return ret;
}