rtl8188eu: More sparse cleanups

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-05-29 14:26:48 -05:00
parent aae7d37e24
commit 61b38d5714
7 changed files with 88 additions and 153 deletions

View file

@ -37,7 +37,7 @@
#endif
#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
static const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
"START",
"STOP",
"SCAN-ACTIVE",
@ -237,7 +237,7 @@ int rtw_android_cmdstr_to_num(char *cmdstr)
return cmd_num;
}
int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
static int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
{
_adapter *padapter = (_adapter *)rtw_netdev_priv(net);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@ -252,7 +252,7 @@ int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
return bytes_written;
}
int rtw_android_get_link_speed(struct net_device *net, char *command, int total_len)
static int rtw_android_get_link_speed(struct net_device *net, char *command, int total_len)
{
_adapter *padapter = (_adapter *)rtw_netdev_priv(net);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@ -266,7 +266,7 @@ int rtw_android_get_link_speed(struct net_device *net, char *command, int total_
return bytes_written;
}
int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len)
static int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len)
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
int bytes_written = 0;
@ -275,7 +275,7 @@ int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len
return bytes_written;
}
int rtw_android_set_country(struct net_device *net, char *command, int total_len)
static int rtw_android_set_country(struct net_device *net, char *command, int total_len)
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
char *country_code = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_COUNTRY]) + 1;
@ -286,7 +286,7 @@ int rtw_android_set_country(struct net_device *net, char *command, int total_len
return (ret==_SUCCESS)?0:-1;
}
int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int total_len)
static int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int total_len)
{
int ret;
int bytes_written = 0;
@ -298,7 +298,7 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota
return bytes_written;
}
int rtw_android_set_block(struct net_device *net, char *command, int total_len)
static int rtw_android_set_block(struct net_device *net, char *command, int total_len)
{
int ret;
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
@ -311,7 +311,7 @@ int rtw_android_set_block(struct net_device *net, char *command, int total_len)
return 0;
}
int get_int_from_command( char* pcmd )
static int get_int_from_command( char* pcmd )
{
int i = 0;
@ -346,7 +346,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
//DBG_88E("%s priv_cmd.buf=%p priv_cmd.total_len=%d priv_cmd.used_len=%d\n",__func__,priv_cmd.buf,priv_cmd.total_len,priv_cmd.used_len);
command = kmalloc(priv_cmd.total_len, GFP_KERNEL);
if (!command)
{
@ -568,17 +567,13 @@ response:
DBG_88E("%s: failed to copy data to user buffer\n", __func__);
ret = -EFAULT;
}
}
else {
} else {
ret = bytes_written;
}
exit:
rtw_unlock_suspend();
if (command) {
if (command)
kfree(command);
}
return ret;
}