From 78f2dd43c455da16b4450e731b933d299eb82b45 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Thu, 7 Jun 2018 14:38:27 +0200 Subject: [PATCH] Update for >= 4.0.0 --- os_dep/linux/rtw_android.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 9066990..3831b88 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -357,10 +357,14 @@ 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]))) - break; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) + if(0 == 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; + return cmd_num; } int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)