diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2015-03-12 15:33:27 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:44:31 +0900 |
commit | 5d792f349831d46f504bc1de6864d0f07581f628 (patch) | |
tree | 2787ae3e83167cf16c35f5ca9de4e0295b492fe5 /drivers/net | |
parent | f38d6c91f9634c5c8a486f659e8826129d8604b4 (diff) |
local/net: bcm4358: replace strnicmp with strncasecmp
Replace the strnicmp with strncasemcp.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd4358/wl_android.c | 208 | ||||
-rw-r--r-- | drivers/net/wireless/bcmdhd4358/wl_cfg_btcoex.c | 4 |
2 files changed, 106 insertions, 106 deletions
diff --git a/drivers/net/wireless/bcmdhd4358/wl_android.c b/drivers/net/wireless/bcmdhd4358/wl_android.c index adde89b009c1..deb7de14729f 100644 --- a/drivers/net/wireless/bcmdhd4358/wl_android.c +++ b/drivers/net/wireless/bcmdhd4358/wl_android.c @@ -3364,7 +3364,7 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) DHD_INFO(("%s: Android private cmd \"%s\" on %s\n", __FUNCTION__, command, ifr->ifr_name)); - if (strnicmp(command, CMD_START, strlen(CMD_START)) == 0) { + if (strncasecmp(command, CMD_START, strlen(CMD_START)) == 0) { DHD_INFO(("%s, Received regular START command\n", __FUNCTION__)); #ifdef SUPPORT_DEEP_SLEEP trigger_deep_sleep = 1; @@ -3372,7 +3372,7 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) bytes_written = wl_android_wifi_on(net); #endif /* SUPPORT_DEEP_SLEEP */ } - else if (strnicmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) { + else if (strncasecmp(command, CMD_SETFWPATH, strlen(CMD_SETFWPATH)) == 0) { bytes_written = wl_android_set_fwpath(net, command, priv_cmd.total_len); } @@ -3383,48 +3383,48 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) goto exit; } - if (strnicmp(command, CMD_STOP, strlen(CMD_STOP)) == 0) { + if (strncasecmp(command, CMD_STOP, strlen(CMD_STOP)) == 0) { #ifdef SUPPORT_DEEP_SLEEP trigger_deep_sleep = 1; #else bytes_written = wl_android_wifi_off(net); #endif /* SUPPORT_DEEP_SLEEP */ } - else if (strnicmp(command, CMD_SCAN_ACTIVE, strlen(CMD_SCAN_ACTIVE)) == 0) { + else if (strncasecmp(command, CMD_SCAN_ACTIVE, strlen(CMD_SCAN_ACTIVE)) == 0) { /* TBD: SCAN-ACTIVE */ } - else if (strnicmp(command, CMD_SCAN_PASSIVE, strlen(CMD_SCAN_PASSIVE)) == 0) { + else if (strncasecmp(command, CMD_SCAN_PASSIVE, strlen(CMD_SCAN_PASSIVE)) == 0) { /* TBD: SCAN-PASSIVE */ } - else if (strnicmp(command, CMD_RSSI, strlen(CMD_RSSI)) == 0) { + else if (strncasecmp(command, CMD_RSSI, strlen(CMD_RSSI)) == 0) { bytes_written = wl_android_get_rssi(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_LINKSPEED, strlen(CMD_LINKSPEED)) == 0) { + else if (strncasecmp(command, CMD_LINKSPEED, strlen(CMD_LINKSPEED)) == 0) { bytes_written = wl_android_get_link_speed(net, command, priv_cmd.total_len); } #ifdef PKT_FILTER_SUPPORT - else if (strnicmp(command, CMD_RXFILTER_START, strlen(CMD_RXFILTER_START)) == 0) { + else if (strncasecmp(command, CMD_RXFILTER_START, strlen(CMD_RXFILTER_START)) == 0) { bytes_written = net_os_enable_packet_filter(net, 1); } - else if (strnicmp(command, CMD_RXFILTER_STOP, strlen(CMD_RXFILTER_STOP)) == 0) { + else if (strncasecmp(command, CMD_RXFILTER_STOP, strlen(CMD_RXFILTER_STOP)) == 0) { bytes_written = net_os_enable_packet_filter(net, 0); } - else if (strnicmp(command, CMD_RXFILTER_ADD, strlen(CMD_RXFILTER_ADD)) == 0) { + else if (strncasecmp(command, CMD_RXFILTER_ADD, strlen(CMD_RXFILTER_ADD)) == 0) { int filter_num = *(command + strlen(CMD_RXFILTER_ADD) + 1) - '0'; bytes_written = net_os_rxfilter_add_remove(net, TRUE, filter_num); } - else if (strnicmp(command, CMD_RXFILTER_REMOVE, strlen(CMD_RXFILTER_REMOVE)) == 0) { + else if (strncasecmp(command, CMD_RXFILTER_REMOVE, strlen(CMD_RXFILTER_REMOVE)) == 0) { int filter_num = *(command + strlen(CMD_RXFILTER_REMOVE) + 1) - '0'; bytes_written = net_os_rxfilter_add_remove(net, FALSE, filter_num); } #endif /* PKT_FILTER_SUPPORT */ - else if (strnicmp(command, CMD_BTCOEXSCAN_START, strlen(CMD_BTCOEXSCAN_START)) == 0) { + else if (strncasecmp(command, CMD_BTCOEXSCAN_START, strlen(CMD_BTCOEXSCAN_START)) == 0) { /* TBD: BTCOEXSCAN-START */ } - else if (strnicmp(command, CMD_BTCOEXSCAN_STOP, strlen(CMD_BTCOEXSCAN_STOP)) == 0) { + else if (strncasecmp(command, CMD_BTCOEXSCAN_STOP, strlen(CMD_BTCOEXSCAN_STOP)) == 0) { /* TBD: BTCOEXSCAN-STOP */ } - else if (strnicmp(command, CMD_BTCOEXMODE, strlen(CMD_BTCOEXMODE)) == 0) { + else if (strncasecmp(command, CMD_BTCOEXMODE, strlen(CMD_BTCOEXMODE)) == 0) { #ifdef WL_CFG80211 void *dhdp = wl_cfg80211_get_dhdp(); bytes_written = wl_cfg80211_set_btcoex_dhcp(net, dhdp, command); @@ -3439,13 +3439,13 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) #endif /* PKT_FILTER_SUPPORT */ #endif /* WL_CFG80211 */ } - else if (strnicmp(command, CMD_SETSUSPENDOPT, strlen(CMD_SETSUSPENDOPT)) == 0) { + else if (strncasecmp(command, CMD_SETSUSPENDOPT, strlen(CMD_SETSUSPENDOPT)) == 0) { bytes_written = wl_android_set_suspendopt(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETSUSPENDMODE, strlen(CMD_SETSUSPENDMODE)) == 0) { + else if (strncasecmp(command, CMD_SETSUSPENDMODE, strlen(CMD_SETSUSPENDMODE)) == 0) { bytes_written = wl_android_set_suspendmode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETBAND, strlen(CMD_SETBAND)) == 0) { + else if (strncasecmp(command, CMD_SETBAND, strlen(CMD_SETBAND)) == 0) { uint band = *(command + strlen(CMD_SETBAND) + 1) - '0'; #ifdef WL_HOST_BAND_MGMT s32 ret = 0; @@ -3468,13 +3468,13 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) wl_update_roamscan_cache_by_band(net, band); #endif } - else if (strnicmp(command, CMD_GETBAND, strlen(CMD_GETBAND)) == 0) { + else if (strncasecmp(command, CMD_GETBAND, strlen(CMD_GETBAND)) == 0) { bytes_written = wl_android_get_band(net, command, priv_cmd.total_len); } #ifdef WL_CFG80211 #ifndef CUSTOMER_SET_COUNTRY /* CUSTOMER_SET_COUNTRY feature is define for only GGSM model */ - else if (strnicmp(command, CMD_COUNTRY, strlen(CMD_COUNTRY)) == 0) { + else if (strncasecmp(command, CMD_COUNTRY, strlen(CMD_COUNTRY)) == 0) { char *country_code = command + strlen(CMD_COUNTRY) + 1; bytes_written = wldev_set_country(net, country_code, true, true); } @@ -3483,188 +3483,188 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) #ifdef CUSTOMER_HW4 #ifdef ROAM_API - else if (strnicmp(command, CMD_ROAMTRIGGER_SET, + else if (strncasecmp(command, CMD_ROAMTRIGGER_SET, strlen(CMD_ROAMTRIGGER_SET)) == 0) { bytes_written = wl_android_set_roam_trigger(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_ROAMTRIGGER_GET, + } else if (strncasecmp(command, CMD_ROAMTRIGGER_GET, strlen(CMD_ROAMTRIGGER_GET)) == 0) { bytes_written = wl_android_get_roam_trigger(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_ROAMDELTA_SET, + } else if (strncasecmp(command, CMD_ROAMDELTA_SET, strlen(CMD_ROAMDELTA_SET)) == 0) { bytes_written = wl_android_set_roam_delta(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_ROAMDELTA_GET, + } else if (strncasecmp(command, CMD_ROAMDELTA_GET, strlen(CMD_ROAMDELTA_GET)) == 0) { bytes_written = wl_android_get_roam_delta(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_ROAMSCANPERIOD_SET, + } else if (strncasecmp(command, CMD_ROAMSCANPERIOD_SET, strlen(CMD_ROAMSCANPERIOD_SET)) == 0) { bytes_written = wl_android_set_roam_scan_period(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_ROAMSCANPERIOD_GET, + } else if (strncasecmp(command, CMD_ROAMSCANPERIOD_GET, strlen(CMD_ROAMSCANPERIOD_GET)) == 0) { bytes_written = wl_android_get_roam_scan_period(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_FULLROAMSCANPERIOD_SET, + } else if (strncasecmp(command, CMD_FULLROAMSCANPERIOD_SET, strlen(CMD_FULLROAMSCANPERIOD_SET)) == 0) { bytes_written = wl_android_set_full_roam_scan_period(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_FULLROAMSCANPERIOD_GET, + } else if (strncasecmp(command, CMD_FULLROAMSCANPERIOD_GET, strlen(CMD_FULLROAMSCANPERIOD_GET)) == 0) { bytes_written = wl_android_get_full_roam_scan_period(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_COUNTRYREV_SET, + } else if (strncasecmp(command, CMD_COUNTRYREV_SET, strlen(CMD_COUNTRYREV_SET)) == 0) { bytes_written = wl_android_set_country_rev(net, command, priv_cmd.total_len); - } else if (strnicmp(command, CMD_COUNTRYREV_GET, + } else if (strncasecmp(command, CMD_COUNTRYREV_GET, strlen(CMD_COUNTRYREV_GET)) == 0) { bytes_written = wl_android_get_country_rev(net, command, priv_cmd.total_len); } #endif /* ROAM_API */ #ifdef WES_SUPPORT - else if (strnicmp(command, CMD_GETROAMSCANCONTROL, strlen(CMD_GETROAMSCANCONTROL)) == 0) { + else if (strncasecmp(command, CMD_GETROAMSCANCONTROL, strlen(CMD_GETROAMSCANCONTROL)) == 0) { bytes_written = wl_android_get_roam_scan_control(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETROAMSCANCONTROL, strlen(CMD_SETROAMSCANCONTROL)) == 0) { + else if (strncasecmp(command, CMD_SETROAMSCANCONTROL, strlen(CMD_SETROAMSCANCONTROL)) == 0) { bytes_written = wl_android_set_roam_scan_control(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETROAMSCANCHANNELS, strlen(CMD_GETROAMSCANCHANNELS)) == 0) { + else if (strncasecmp(command, CMD_GETROAMSCANCHANNELS, strlen(CMD_GETROAMSCANCHANNELS)) == 0) { bytes_written = wl_android_get_roam_scan_channels(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETROAMSCANCHANNELS, strlen(CMD_SETROAMSCANCHANNELS)) == 0) { + else if (strncasecmp(command, CMD_SETROAMSCANCHANNELS, strlen(CMD_SETROAMSCANCHANNELS)) == 0) { bytes_written = wl_android_set_roam_scan_channels(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SENDACTIONFRAME, strlen(CMD_SENDACTIONFRAME)) == 0) { + else if (strncasecmp(command, CMD_SENDACTIONFRAME, strlen(CMD_SENDACTIONFRAME)) == 0) { bytes_written = wl_android_send_action_frame(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_REASSOC, strlen(CMD_REASSOC)) == 0) { + else if (strncasecmp(command, CMD_REASSOC, strlen(CMD_REASSOC)) == 0) { bytes_written = wl_android_reassoc(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETSCANCHANNELTIME, strlen(CMD_GETSCANCHANNELTIME)) == 0) { + else if (strncasecmp(command, CMD_GETSCANCHANNELTIME, strlen(CMD_GETSCANCHANNELTIME)) == 0) { bytes_written = wl_android_get_scan_channel_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETSCANCHANNELTIME, strlen(CMD_SETSCANCHANNELTIME)) == 0) { + else if (strncasecmp(command, CMD_SETSCANCHANNELTIME, strlen(CMD_SETSCANCHANNELTIME)) == 0) { bytes_written = wl_android_set_scan_channel_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETSCANHOMETIME, strlen(CMD_GETSCANHOMETIME)) == 0) { + else if (strncasecmp(command, CMD_GETSCANHOMETIME, strlen(CMD_GETSCANHOMETIME)) == 0) { bytes_written = wl_android_get_scan_home_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETSCANHOMETIME, strlen(CMD_SETSCANHOMETIME)) == 0) { + else if (strncasecmp(command, CMD_SETSCANHOMETIME, strlen(CMD_SETSCANHOMETIME)) == 0) { bytes_written = wl_android_set_scan_home_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETSCANHOMEAWAYTIME, strlen(CMD_GETSCANHOMEAWAYTIME)) == 0) { + else if (strncasecmp(command, CMD_GETSCANHOMEAWAYTIME, strlen(CMD_GETSCANHOMEAWAYTIME)) == 0) { bytes_written = wl_android_get_scan_home_away_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETSCANHOMEAWAYTIME, strlen(CMD_SETSCANHOMEAWAYTIME)) == 0) { + else if (strncasecmp(command, CMD_SETSCANHOMEAWAYTIME, strlen(CMD_SETSCANHOMEAWAYTIME)) == 0) { bytes_written = wl_android_set_scan_home_away_time(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETSCANNPROBES, strlen(CMD_GETSCANNPROBES)) == 0) { + else if (strncasecmp(command, CMD_GETSCANNPROBES, strlen(CMD_GETSCANNPROBES)) == 0) { bytes_written = wl_android_get_scan_nprobes(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETSCANNPROBES, strlen(CMD_SETSCANNPROBES)) == 0) { + else if (strncasecmp(command, CMD_SETSCANNPROBES, strlen(CMD_SETSCANNPROBES)) == 0) { bytes_written = wl_android_set_scan_nprobes(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETDFSSCANMODE, strlen(CMD_GETDFSSCANMODE)) == 0) { + else if (strncasecmp(command, CMD_GETDFSSCANMODE, strlen(CMD_GETDFSSCANMODE)) == 0) { bytes_written = wl_android_get_scan_dfs_channel_mode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETDFSSCANMODE, strlen(CMD_SETDFSSCANMODE)) == 0) { + else if (strncasecmp(command, CMD_SETDFSSCANMODE, strlen(CMD_SETDFSSCANMODE)) == 0) { bytes_written = wl_android_set_scan_dfs_channel_mode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETWESMODE, strlen(CMD_GETWESMODE)) == 0) { + else if (strncasecmp(command, CMD_GETWESMODE, strlen(CMD_GETWESMODE)) == 0) { bytes_written = wl_android_get_wes_mode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETWESMODE, strlen(CMD_SETWESMODE)) == 0) { + else if (strncasecmp(command, CMD_SETWESMODE, strlen(CMD_SETWESMODE)) == 0) { bytes_written = wl_android_set_wes_mode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GETOKCMODE, strlen(CMD_GETOKCMODE)) == 0) { + else if (strncasecmp(command, CMD_GETOKCMODE, strlen(CMD_GETOKCMODE)) == 0) { bytes_written = wl_android_get_okc_mode(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SETOKCMODE, strlen(CMD_SETOKCMODE)) == 0) { + else if (strncasecmp(command, CMD_SETOKCMODE, strlen(CMD_SETOKCMODE)) == 0) { bytes_written = wl_android_set_okc_mode(net, command, priv_cmd.total_len); } #endif /* WES_SUPPORT */ #endif /* CUSTOMER_HW4 */ #ifdef PNO_SUPPORT - else if (strnicmp(command, CMD_PNOSSIDCLR_SET, strlen(CMD_PNOSSIDCLR_SET)) == 0) { + else if (strncasecmp(command, CMD_PNOSSIDCLR_SET, strlen(CMD_PNOSSIDCLR_SET)) == 0) { bytes_written = dhd_dev_pno_stop_for_ssid(net); } #ifndef WL_SCHED_SCAN - else if (strnicmp(command, CMD_PNOSETUP_SET, strlen(CMD_PNOSETUP_SET)) == 0) { + else if (strncasecmp(command, CMD_PNOSETUP_SET, strlen(CMD_PNOSETUP_SET)) == 0) { bytes_written = wl_android_set_pno_setup(net, command, priv_cmd.total_len); } #endif /* !WL_SCHED_SCAN */ - else if (strnicmp(command, CMD_PNOENABLE_SET, strlen(CMD_PNOENABLE_SET)) == 0) { + else if (strncasecmp(command, CMD_PNOENABLE_SET, strlen(CMD_PNOENABLE_SET)) == 0) { int enable = *(command + strlen(CMD_PNOENABLE_SET) + 1) - '0'; bytes_written = (enable)? 0 : dhd_dev_pno_stop_for_ssid(net); } - else if (strnicmp(command, CMD_WLS_BATCHING, strlen(CMD_WLS_BATCHING)) == 0) { + else if (strncasecmp(command, CMD_WLS_BATCHING, strlen(CMD_WLS_BATCHING)) == 0) { bytes_written = wls_parse_batching_cmd(net, command, priv_cmd.total_len); } #endif /* PNO_SUPPORT */ - else if (strnicmp(command, CMD_P2P_DEV_ADDR, strlen(CMD_P2P_DEV_ADDR)) == 0) { + else if (strncasecmp(command, CMD_P2P_DEV_ADDR, strlen(CMD_P2P_DEV_ADDR)) == 0) { bytes_written = wl_android_get_p2p_dev_addr(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_P2P_SET_NOA, strlen(CMD_P2P_SET_NOA)) == 0) { + else if (strncasecmp(command, CMD_P2P_SET_NOA, strlen(CMD_P2P_SET_NOA)) == 0) { int skip = strlen(CMD_P2P_SET_NOA) + 1; bytes_written = wl_cfg80211_set_p2p_noa(net, command + skip, priv_cmd.total_len - skip); } #ifdef WL_NAN - else if (strnicmp(command, CMD_NAN, strlen(CMD_NAN)) == 0) { + else if (strncasecmp(command, CMD_NAN, strlen(CMD_NAN)) == 0) { bytes_written = wl_cfg80211_nan_cmd_handler(net, command, priv_cmd.total_len); } #endif /* WL_NAN */ #if !defined WL_ENABLE_P2P_IF - else if (strnicmp(command, CMD_P2P_GET_NOA, strlen(CMD_P2P_GET_NOA)) == 0) { + else if (strncasecmp(command, CMD_P2P_GET_NOA, strlen(CMD_P2P_GET_NOA)) == 0) { bytes_written = wl_cfg80211_get_p2p_noa(net, command, priv_cmd.total_len); } #endif /* WL_ENABLE_P2P_IF */ - else if (strnicmp(command, CMD_P2P_SET_PS, strlen(CMD_P2P_SET_PS)) == 0) { + else if (strncasecmp(command, CMD_P2P_SET_PS, strlen(CMD_P2P_SET_PS)) == 0) { int skip = strlen(CMD_P2P_SET_PS) + 1; bytes_written = wl_cfg80211_set_p2p_ps(net, command + skip, priv_cmd.total_len - skip); } #ifdef WL_CFG80211 - else if (strnicmp(command, CMD_SET_AP_WPS_P2P_IE, + else if (strncasecmp(command, CMD_SET_AP_WPS_P2P_IE, strlen(CMD_SET_AP_WPS_P2P_IE)) == 0) { int skip = strlen(CMD_SET_AP_WPS_P2P_IE) + 3; bytes_written = wl_cfg80211_set_wps_p2p_ie(net, command + skip, priv_cmd.total_len - skip, *(command + skip - 2) - '0'); } #ifdef WLFBT - else if (strnicmp(command, CMD_GET_FTKEY, strlen(CMD_GET_FTKEY)) == 0) { + else if (strncasecmp(command, CMD_GET_FTKEY, strlen(CMD_GET_FTKEY)) == 0) { wl_cfg80211_get_fbt_key(command); bytes_written = FBT_KEYLEN; } #endif /* WLFBT */ #endif /* WL_CFG80211 */ - else if (strnicmp(command, CMD_OKC_SET_PMK, strlen(CMD_OKC_SET_PMK)) == 0) + else if (strncasecmp(command, CMD_OKC_SET_PMK, strlen(CMD_OKC_SET_PMK)) == 0) bytes_written = wl_android_set_pmk(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_OKC_ENABLE, strlen(CMD_OKC_ENABLE)) == 0) + else if (strncasecmp(command, CMD_OKC_ENABLE, strlen(CMD_OKC_ENABLE)) == 0) bytes_written = wl_android_okc_enable(net, command, priv_cmd.total_len); #ifdef BCMCCX - else if (strnicmp(command, CMD_GETCCKM_RN, strlen(CMD_GETCCKM_RN)) == 0) { + else if (strncasecmp(command, CMD_GETCCKM_RN, strlen(CMD_GETCCKM_RN)) == 0) { bytes_written = wl_android_get_cckm_rn(net, command); } - else if (strnicmp(command, CMD_SETCCKM_KRK, strlen(CMD_SETCCKM_KRK)) == 0) { + else if (strncasecmp(command, CMD_SETCCKM_KRK, strlen(CMD_SETCCKM_KRK)) == 0) { bytes_written = wl_android_set_cckm_krk(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_GET_ASSOC_RES_IES, strlen(CMD_GET_ASSOC_RES_IES)) == 0) { + else if (strncasecmp(command, CMD_GET_ASSOC_RES_IES, strlen(CMD_GET_ASSOC_RES_IES)) == 0) { bytes_written = wl_android_get_assoc_res_ies(net, command); } #endif /* BCMCCX */ #if defined(WL_SUPPORT_AUTO_CHANNEL) - else if (strnicmp(command, CMD_GET_BEST_CHANNELS, + else if (strncasecmp(command, CMD_GET_BEST_CHANNELS, strlen(CMD_GET_BEST_CHANNELS)) == 0) { bytes_written = wl_cfg80211_get_best_channels(net, command, priv_cmd.total_len); @@ -3673,13 +3673,13 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) #ifdef CUSTOMER_HW4 #ifdef SUPPORT_AMPDU_MPDU_CMD /* CMD_AMPDU_MPDU */ - else if (strnicmp(command, CMD_AMPDU_MPDU, strlen(CMD_AMPDU_MPDU)) == 0) { + else if (strncasecmp(command, CMD_AMPDU_MPDU, strlen(CMD_AMPDU_MPDU)) == 0) { int skip = strlen(CMD_AMPDU_MPDU) + 1; bytes_written = wl_android_set_ampdu_mpdu(net, (const char*)command+skip); } #endif /* SUPPORT_AMPDU_MPDU_CMD */ #if defined(WL_SUPPORT_AUTO_CHANNEL) - else if (strnicmp(command, CMD_SET_HAPD_AUTO_CHANNEL, + else if (strncasecmp(command, CMD_SET_HAPD_AUTO_CHANNEL, strlen(CMD_SET_HAPD_AUTO_CHANNEL)) == 0) { int skip = strlen(CMD_SET_HAPD_AUTO_CHANNEL) + 3; bytes_written = wl_android_set_auto_channel(net, (const char*)command+skip, command, @@ -3687,157 +3687,157 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) } #endif /* WL_SUPPORT_AUTO_CHANNEL */ #if defined(SUPPORT_HIDDEN_AP) - else if (strnicmp(command, CMD_SET_HAPD_MAX_NUM_STA, + else if (strncasecmp(command, CMD_SET_HAPD_MAX_NUM_STA, strlen(CMD_SET_HAPD_MAX_NUM_STA)) == 0) { int skip = strlen(CMD_SET_HAPD_MAX_NUM_STA) + 3; wl_android_set_max_num_sta(net, (const char*)command+skip); } - else if (strnicmp(command, CMD_SET_HAPD_SSID, + else if (strncasecmp(command, CMD_SET_HAPD_SSID, strlen(CMD_SET_HAPD_SSID)) == 0) { int skip = strlen(CMD_SET_HAPD_SSID) + 3; wl_android_set_ssid(net, (const char*)command+skip); } - else if (strnicmp(command, CMD_SET_HAPD_HIDE_SSID, + else if (strncasecmp(command, CMD_SET_HAPD_HIDE_SSID, strlen(CMD_SET_HAPD_HIDE_SSID)) == 0) { int skip = strlen(CMD_SET_HAPD_HIDE_SSID) + 3; wl_android_set_hide_ssid(net, (const char*)command+skip); } #endif /* SUPPORT_HIDDEN_AP */ #ifdef SUPPORT_SOFTAP_SINGL_DISASSOC - else if (strnicmp(command, CMD_HAPD_STA_DISASSOC, + else if (strncasecmp(command, CMD_HAPD_STA_DISASSOC, strlen(CMD_HAPD_STA_DISASSOC)) == 0) { int skip = strlen(CMD_HAPD_STA_DISASSOC) + 1; wl_android_sta_diassoc(net, (const char*)command+skip); } #endif /* SUPPORT_SOFTAP_SINGL_DISASSOC */ #ifdef SUPPORT_SET_LPC - else if (strnicmp(command, CMD_HAPD_LPC_ENABLED, + else if (strncasecmp(command, CMD_HAPD_LPC_ENABLED, strlen(CMD_HAPD_LPC_ENABLED)) == 0) { int skip = strlen(CMD_HAPD_LPC_ENABLED) + 3; wl_android_set_lpc(net, (const char*)command+skip); } #endif /* SUPPORT_SET_LPC */ #ifdef SUPPORT_TRIGGER_HANG_EVENT - else if (strnicmp(command, CMD_TEST_FORCE_HANG, + else if (strncasecmp(command, CMD_TEST_FORCE_HANG, strlen(CMD_TEST_FORCE_HANG)) == 0) { net_os_send_hang_message(net); } #endif /* SUPPORT_TRIGGER_HANG_EVENT */ - else if (strnicmp(command, CMD_CHANGE_RL, strlen(CMD_CHANGE_RL)) == 0) + else if (strncasecmp(command, CMD_CHANGE_RL, strlen(CMD_CHANGE_RL)) == 0) bytes_written = wl_android_ch_res_rl(net, true); - else if (strnicmp(command, CMD_RESTORE_RL, strlen(CMD_RESTORE_RL)) == 0) + else if (strncasecmp(command, CMD_RESTORE_RL, strlen(CMD_RESTORE_RL)) == 0) bytes_written = wl_android_ch_res_rl(net, false); #ifdef SUPPORT_LTECX - else if (strnicmp(command, CMD_LTECX_SET, strlen(CMD_LTECX_SET)) == 0) { + else if (strncasecmp(command, CMD_LTECX_SET, strlen(CMD_LTECX_SET)) == 0) { int skip = strlen(CMD_LTECX_SET) + 1; bytes_written = wl_android_set_ltecx(net, (const char*)command+skip); } #endif /* SUPPORT_LTECX */ - else if (strnicmp(command, CMD_SET_RMC_ENABLE, strlen(CMD_SET_RMC_ENABLE)) == 0) { + else if (strncasecmp(command, CMD_SET_RMC_ENABLE, strlen(CMD_SET_RMC_ENABLE)) == 0) { int rmc_enable = *(command + strlen(CMD_SET_RMC_ENABLE) + 1) - '0'; bytes_written = wl_android_rmc_enable(net, rmc_enable); } - else if (strnicmp(command, CMD_SET_RMC_TXRATE, strlen(CMD_SET_RMC_TXRATE)) == 0) { + else if (strncasecmp(command, CMD_SET_RMC_TXRATE, strlen(CMD_SET_RMC_TXRATE)) == 0) { int rmc_txrate; sscanf(command, "%*s %10d", &rmc_txrate); bytes_written = wldev_iovar_setint(net, "rmc_txrate", rmc_txrate * 2); } - else if (strnicmp(command, CMD_SET_RMC_ACTPERIOD, strlen(CMD_SET_RMC_ACTPERIOD)) == 0) { + else if (strncasecmp(command, CMD_SET_RMC_ACTPERIOD, strlen(CMD_SET_RMC_ACTPERIOD)) == 0) { int actperiod; sscanf(command, "%*s %10d", &actperiod); bytes_written = wldev_iovar_setint(net, "rmc_actf_time", actperiod); } - else if (strnicmp(command, CMD_SET_RMC_IDLEPERIOD, strlen(CMD_SET_RMC_IDLEPERIOD)) == 0) { + else if (strncasecmp(command, CMD_SET_RMC_IDLEPERIOD, strlen(CMD_SET_RMC_IDLEPERIOD)) == 0) { int acktimeout; sscanf(command, "%*s %10d", &acktimeout); acktimeout *= 1000; bytes_written = wldev_iovar_setint(net, "rmc_acktmo", acktimeout); } - else if (strnicmp(command, CMD_SET_RMC_LEADER, strlen(CMD_SET_RMC_LEADER)) == 0) { + else if (strncasecmp(command, CMD_SET_RMC_LEADER, strlen(CMD_SET_RMC_LEADER)) == 0) { int skip = strlen(CMD_SET_RMC_LEADER) + 1; bytes_written = wl_android_rmc_set_leader(net, (const char*)command+skip); } - else if (strnicmp(command, CMD_SET_RMC_EVENT, + else if (strncasecmp(command, CMD_SET_RMC_EVENT, strlen(CMD_SET_RMC_EVENT)) == 0) bytes_written = wl_android_set_rmc_event(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_GET_SCSCAN, strlen(CMD_GET_SCSCAN)) == 0) { + else if (strncasecmp(command, CMD_GET_SCSCAN, strlen(CMD_GET_SCSCAN)) == 0) { bytes_written = wl_android_get_singlecore_scan(net, command, priv_cmd.total_len); } - else if (strnicmp(command, CMD_SET_SCSCAN, strlen(CMD_SET_SCSCAN)) == 0) { + else if (strncasecmp(command, CMD_SET_SCSCAN, strlen(CMD_SET_SCSCAN)) == 0) { bytes_written = wl_android_set_singlecore_scan(net, command, priv_cmd.total_len); } #ifdef TEST_TX_POWER_CONTROL - else if (strnicmp(command, CMD_TEST_SET_TX_POWER, + else if (strncasecmp(command, CMD_TEST_SET_TX_POWER, strlen(CMD_TEST_SET_TX_POWER)) == 0) { int skip = strlen(CMD_TEST_SET_TX_POWER) + 1; wl_android_set_tx_power(net, (const char*)command+skip); } - else if (strnicmp(command, CMD_TEST_GET_TX_POWER, + else if (strncasecmp(command, CMD_TEST_GET_TX_POWER, strlen(CMD_TEST_GET_TX_POWER)) == 0) { wl_android_get_tx_power(net, command, priv_cmd.total_len); } #endif /* TEST_TX_POWER_CONTROL */ - else if (strnicmp(command, CMD_SARLIMIT_TX_CONTROL, + else if (strncasecmp(command, CMD_SARLIMIT_TX_CONTROL, strlen(CMD_SARLIMIT_TX_CONTROL)) == 0) { int skip = strlen(CMD_SARLIMIT_TX_CONTROL) + 1; wl_android_set_sarlimit_txctrl(net, (const char*)command+skip); } #ifdef SET_RPS_CPUS - else if (strnicmp(command, CMD_RPSMODE, strlen(CMD_RPSMODE)) == 0) { + else if (strncasecmp(command, CMD_RPSMODE, strlen(CMD_RPSMODE)) == 0) { bytes_written = wl_android_set_rps_cpus(net, command, priv_cmd.total_len); } #endif /* SET_RPS_CPUS */ #endif /* CUSTOMER_HW4 */ - else if (strnicmp(command, CMD_HAPD_MAC_FILTER, strlen(CMD_HAPD_MAC_FILTER)) == 0) { + else if (strncasecmp(command, CMD_HAPD_MAC_FILTER, strlen(CMD_HAPD_MAC_FILTER)) == 0) { int skip = strlen(CMD_HAPD_MAC_FILTER) + 1; wl_android_set_mac_address_filter(net, (const char*)command+skip); } - else if (strnicmp(command, CMD_SETROAMMODE, strlen(CMD_SETROAMMODE)) == 0) + else if (strncasecmp(command, CMD_SETROAMMODE, strlen(CMD_SETROAMMODE)) == 0) bytes_written = wl_android_set_roam_mode(net, command, priv_cmd.total_len); #if defined(BCMFW_ROAM_ENABLE) - else if (strnicmp(command, CMD_SET_ROAMPREF, strlen(CMD_SET_ROAMPREF)) == 0) { + else if (strncasecmp(command, CMD_SET_ROAMPREF, strlen(CMD_SET_ROAMPREF)) == 0) { bytes_written = wl_android_set_roampref(net, command, priv_cmd.total_len); } #endif /* BCMFW_ROAM_ENABLE */ - else if (strnicmp(command, CMD_MIRACAST, strlen(CMD_MIRACAST)) == 0) + else if (strncasecmp(command, CMD_MIRACAST, strlen(CMD_MIRACAST)) == 0) bytes_written = wl_android_set_miracast(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_SETIBSSBEACONOUIDATA, strlen(CMD_SETIBSSBEACONOUIDATA)) == 0) + else if (strncasecmp(command, CMD_SETIBSSBEACONOUIDATA, strlen(CMD_SETIBSSBEACONOUIDATA)) == 0) bytes_written = wl_android_set_ibss_beacon_ouidata(net, command, priv_cmd.total_len); #ifdef WLAIBSS - else if (strnicmp(command, CMD_SETIBSSTXFAILEVENT, + else if (strncasecmp(command, CMD_SETIBSSTXFAILEVENT, strlen(CMD_SETIBSSTXFAILEVENT)) == 0) bytes_written = wl_android_set_ibss_txfail_event(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_GET_IBSS_PEER_INFO_ALL, + else if (strncasecmp(command, CMD_GET_IBSS_PEER_INFO_ALL, strlen(CMD_GET_IBSS_PEER_INFO_ALL)) == 0) bytes_written = wl_android_get_ibss_peer_info(net, command, priv_cmd.total_len, TRUE); - else if (strnicmp(command, CMD_GET_IBSS_PEER_INFO, + else if (strncasecmp(command, CMD_GET_IBSS_PEER_INFO, strlen(CMD_GET_IBSS_PEER_INFO)) == 0) bytes_written = wl_android_get_ibss_peer_info(net, command, priv_cmd.total_len, FALSE); - else if (strnicmp(command, CMD_SETIBSSROUTETABLE, + else if (strncasecmp(command, CMD_SETIBSSROUTETABLE, strlen(CMD_SETIBSSROUTETABLE)) == 0) bytes_written = wl_android_set_ibss_routetable(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_SETIBSSAMPDU, strlen(CMD_SETIBSSAMPDU)) == 0) + else if (strncasecmp(command, CMD_SETIBSSAMPDU, strlen(CMD_SETIBSSAMPDU)) == 0) bytes_written = wl_android_set_ibss_ampdu(net, command, priv_cmd.total_len); - else if (strnicmp(command, CMD_SETIBSSANTENNAMODE, strlen(CMD_SETIBSSANTENNAMODE)) == 0) + else if (strncasecmp(command, CMD_SETIBSSANTENNAMODE, strlen(CMD_SETIBSSANTENNAMODE)) == 0) bytes_written = wl_android_set_ibss_antenna(net, command, priv_cmd.total_len); #endif /* WLAIBSS */ - else if (strnicmp(command, CMD_KEEP_ALIVE, strlen(CMD_KEEP_ALIVE)) == 0) { + else if (strncasecmp(command, CMD_KEEP_ALIVE, strlen(CMD_KEEP_ALIVE)) == 0) { int skip = strlen(CMD_KEEP_ALIVE) + 1; bytes_written = wl_keep_alive_set(net, command + skip, priv_cmd.total_len - skip); } - else if (strnicmp(command, CMD_ROAM_OFFLOAD, strlen(CMD_ROAM_OFFLOAD)) == 0) { + else if (strncasecmp(command, CMD_ROAM_OFFLOAD, strlen(CMD_ROAM_OFFLOAD)) == 0) { int enable = *(command + strlen(CMD_ROAM_OFFLOAD) + 1) - '0'; bytes_written = wl_cfg80211_enable_roam_offload(net, enable); } - else if (strnicmp(command, CMD_ROAM_OFFLOAD_APLIST, strlen(CMD_ROAM_OFFLOAD_APLIST)) == 0) { + else if (strncasecmp(command, CMD_ROAM_OFFLOAD_APLIST, strlen(CMD_ROAM_OFFLOAD_APLIST)) == 0) { bytes_written = wl_android_set_roam_offload_bssid_list(net, command + strlen(CMD_ROAM_OFFLOAD_APLIST) + 1); } - else if (strnicmp(command, CMD_GET_LINK_STATUS, strlen(CMD_GET_LINK_STATUS)) == 0) { + else if (strncasecmp(command, CMD_GET_LINK_STATUS, strlen(CMD_GET_LINK_STATUS)) == 0) { bytes_written = wl_android_get_link_status(net, command, priv_cmd.total_len); } else { diff --git a/drivers/net/wireless/bcmdhd4358/wl_cfg_btcoex.c b/drivers/net/wireless/bcmdhd4358/wl_cfg_btcoex.c index 0220da12d479..c3acc97b4522 100644 --- a/drivers/net/wireless/bcmdhd4358/wl_cfg_btcoex.c +++ b/drivers/net/wireless/bcmdhd4358/wl_cfg_btcoex.c @@ -434,7 +434,7 @@ int wl_cfg80211_set_btcoex_dhcp(struct net_device *dev, dhd_pub_t *dhd, char *co /* Figure out powermode 1 or o command */ strncpy((char *)&powermode_val, command + strlen("BTCOEXMODE") +1, 1); - if (strnicmp((char *)&powermode_val, "1", strlen("1")) == 0) { + if (strncasecmp((char *)&powermode_val, "1", strlen("1")) == 0) { WL_TRACE_HW4(("DHCP session starts\n")); @@ -485,7 +485,7 @@ int wl_cfg80211_set_btcoex_dhcp(struct net_device *dev, dhd_pub_t *dhd, char *co WL_ERR(("was called w/o DHCP OFF. Continue\n")); } } - else if (strnicmp((char *)&powermode_val, "2", strlen("2")) == 0) { + else if (strncasecmp((char *)&powermode_val, "2", strlen("2")) == 0) { |