rtl8188eu: Fix build on kernel version 4.0+

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-24 09:42:06 -06:00
parent f760caeb39
commit 9196aebe1e

View file

@ -79,9 +79,14 @@ static int g_wifi_on = true;
int rtw_android_cmdstr_to_num(char *cmdstr)
{
int cmd_num;
for (cmd_num = 0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++)
if (0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num])))
for(cmd_num=0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
if (!strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num])))
#else
if(0 == strnicmp(cmdstr, android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num])))
#endif
break;
return cmd_num;
}