diff options
author | Chaehyun Lim | 2015-08-07 02:02:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-08-08 00:16:58 +0200 |
commit | 1a646e7e9e4227d4eeb9ccbbc2d976b3b256a1e6 (patch) | |
tree | 4d045f6ae323bd110ecea865b348768eca01f0ab /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | staging: wilc1000: remove WILC_memset function (diff) | |
download | kernel-qcow2-linux-1a646e7e9e4227d4eeb9ccbbc2d976b3b256a1e6.tar.gz kernel-qcow2-linux-1a646e7e9e4227d4eeb9ccbbc2d976b3b256a1e6.tar.xz kernel-qcow2-linux-1a646e7e9e4227d4eeb9ccbbc2d976b3b256a1e6.zip |
staging: wilc1000: use memcmp instead of WILC_memcmp
Use memcmp instead of WILC_memcmp.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e38aad049ac7..060288a3460d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -202,7 +202,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan) channel = ieee80211_get_channel(wiphy, s32Freq); rssi = get_rssi_avg(pstrNetworkInfo); - if (WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7) || bDirectScan) { + if (memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7) || bDirectScan) { bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, (size_t)pstrNetworkInfo->u16IEsLen, (((s32)rssi) * 100), GFP_KERNEL); @@ -283,7 +283,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) } else { /* Linear search for now */ for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { - if (WILC_memcmp(astrLastScannedNtwrksShadow[i].au8bssid, + if (memcmp(astrLastScannedNtwrksShadow[i].au8bssid, pstrNetworkInfo->au8bssid, 6) == 0) { state = i; break; @@ -414,7 +414,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo /*P2P peers are sent to WPA supplicant and added to shadow table*/ - if (!(WILC_memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7))) { + if (!(memcmp("DIRECT-", pstrNetworkInfo->au8ssid, 7))) { bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, pstrNetworkInfo->au8bssid, pstrNetworkInfo->u64Tsf, pstrNetworkInfo->u16CapInfo, pstrNetworkInfo->u16BeaconPeriod, (const u8 *)pstrNetworkInfo->pu8IEs, (size_t)pstrNetworkInfo->u16IEsLen, (((s32)pstrNetworkInfo->s8rssi) * 100), GFP_KERNEL); @@ -429,7 +429,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo u32 i; /* So this network is discovered before, we'll just update its RSSI */ for (i = 0; i < priv->u32RcvdChCount; i++) { - if (WILC_memcmp(astrLastScannedNtwrksShadow[i].au8bssid, pstrNetworkInfo->au8bssid, 6) == 0) { + if (memcmp(astrLastScannedNtwrksShadow[i].au8bssid, pstrNetworkInfo->au8bssid, 6) == 0) { PRINT_D(CFG80211_DBG, "Update RSSI of %s \n", astrLastScannedNtwrksShadow[i].au8ssid); astrLastScannedNtwrksShadow[i].s8rssi = pstrNetworkInfo->s8rssi; @@ -503,7 +503,7 @@ int WILC_WFI_Set_PMKSA(u8 *bssid, struct WILC_WFI_priv *priv) for (i = 0; i < priv->pmkid_list.numpmkid; i++) { - if (!WILC_memcmp(bssid, priv->pmkid_list.pmkidlist[i].bssid, + if (!memcmp(bssid, priv->pmkid_list.pmkidlist[i].bssid, ETH_ALEN)) { PRINT_D(CFG80211_DBG, "PMKID successful comparison"); @@ -599,7 +599,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, * Linux kernel warning generated at the nl80211 layer */ for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { - if (WILC_memcmp(astrLastScannedNtwrksShadow[i].au8bssid, + if (memcmp(astrLastScannedNtwrksShadow[i].au8bssid, pstrConnectInfo->au8bssid, ETH_ALEN) == 0) { unsigned long now = jiffies; @@ -845,7 +845,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { if ((sme->ssid_len == astrLastScannedNtwrksShadow[i].u8SsidLen) && - WILC_memcmp(astrLastScannedNtwrksShadow[i].au8ssid, + memcmp(astrLastScannedNtwrksShadow[i].au8ssid, sme->ssid, sme->ssid_len) == 0) { PRINT_INFO(CFG80211_DBG, "Network with required SSID is found %s\n", sme->ssid); @@ -857,7 +857,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev, } else { /* BSSID is also passed from the user, so decision of matching * should consider also this passed BSSID */ - if (WILC_memcmp(astrLastScannedNtwrksShadow[i].au8bssid, + if (memcmp(astrLastScannedNtwrksShadow[i].au8bssid, sme->bssid, ETH_ALEN) == 0) { PRINT_INFO(CFG80211_DBG, "BSSID is passed from the user and matched\n"); @@ -1170,7 +1170,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k break; } #endif - if (WILC_memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) { + if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) { priv->WILC_WFI_wep_default = key_index; priv->WILC_WFI_wep_key_len[key_index] = params->key_len; WILC_memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len); @@ -1896,7 +1896,7 @@ static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, for (i = 0; i < priv->pmkid_list.numpmkid; i++) { - if (!WILC_memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, + if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, ETH_ALEN)) { /*If bssid already exists and pmkid value needs to reset*/ flag = PMKID_FOUND; @@ -1946,7 +1946,7 @@ static int WILC_WFI_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, PRINT_D(CFG80211_DBG, "Deleting PMKSA keys\n"); for (i = 0; i < priv->pmkid_list.numpmkid; i++) { - if (!WILC_memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, + if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, ETH_ALEN)) { /*If bssid is found, reset the values*/ PRINT_D(CFG80211_DBG, "Reseting PMKID values\n"); @@ -2257,11 +2257,11 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) case PUBLIC_ACT_VENDORSPEC: /*Now we have a public action vendor specific action frame, check if its a p2p public action frame * based on the standard its should have the p2p_oui attribute with the following values 50 6f 9A 09*/ - if (!WILC_memcmp(u8P2P_oui, &buff[ACTION_SUBTYPE_ID + 1], 4)) { + if (!memcmp(u8P2P_oui, &buff[ACTION_SUBTYPE_ID + 1], 4)) { if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP)) { if (!bWilc_ie) { for (i = P2P_PUB_ACTION_SUBTYPE; i < size; i++) { - if (!WILC_memcmp(u8P2P_vendorspec, &buff[i], 6)) { + if (!memcmp(u8P2P_vendorspec, &buff[i], 6)) { u8P2Precvrandom = buff[i + 6]; bWilc_ie = true; PRINT_D(GENERIC_DBG, "WILC Vendor specific IE:%02x\n", u8P2Precvrandom); @@ -2274,7 +2274,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size) if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP || buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) { for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < size; i++) { - if (buff[i] == P2PELEM_ATTR_ID && !(WILC_memcmp(u8P2P_oui, &buff[i + 2], 4))) { + if (buff[i] == P2PELEM_ATTR_ID && !(memcmp(u8P2P_oui, &buff[i + 2], 4))) { WILC_WFI_CfgParseRxAction(&buff[i + 6], size - (i + 6)); break; } @@ -2570,7 +2570,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, { /*Now we have a public action vendor specific action frame, check if its a p2p public action frame * based on the standard its should have the p2p_oui attribute with the following values 50 6f 9A 09*/ - if (!WILC_memcmp(u8P2P_oui, &buf[ACTION_SUBTYPE_ID + 1], 4)) { + if (!memcmp(u8P2P_oui, &buf[ACTION_SUBTYPE_ID + 1], 4)) { /*For the connection of two WILC's connection generate a rand number to determine who will be a GO*/ if ((buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP)) { if (u8P2Plocalrandom == 1 && u8P2Precvrandom < u8P2Plocalrandom) { @@ -2587,7 +2587,7 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy, /*Search for the p2p information information element , after the Public action subtype theres a byte for teh dialog token, skip that*/ for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < len; i++) { - if (buf[i] == P2PELEM_ATTR_ID && !(WILC_memcmp(u8P2P_oui, &buf[i + 2], 4))) { + if (buf[i] == P2PELEM_ATTR_ID && !(memcmp(u8P2P_oui, &buf[i + 2], 4))) { if (buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP) WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), true, nic->iftype); |