From: Brett Rudley Date: Wed, 1 Dec 2010 04:32:51 +0000 (-0800) Subject: staging: brcm80211: bcmp => memcmp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a043b26646444eba28e5010965dbf61bc3ba5277;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: brcm80211: bcmp => memcmp s/bcmp/memcmp/ Signed-off-by: Brett Rudley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index e212abb8a357..ce5f9134055c 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c @@ -834,7 +834,7 @@ wl_host_event(struct dhd_info *dhd, int *ifidx, void *pktdata, u16 flags; int evlen; - if (bcmp(BRCM_OUI, &pvt_data->bcm_hdr.oui[0], DOT11_OUI_LEN)) { + if (memcmp(BRCM_OUI, &pvt_data->bcm_hdr.oui[0], DOT11_OUI_LEN)) { DHD_ERROR(("%s: mismatched OUI, bailing\n", __func__)); return BCME_ERROR; } diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c index 8bf24c7ce684..e524cd102c41 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c @@ -1407,7 +1407,7 @@ static bool ie_is_wpa_ie(u8 **wpaie, u8 **tlvs, int *tlvs_len) u8 *ie = *wpaie; if ((ie[1] >= 6) && - !bcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x01"), 4)) { + !memcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x01"), 4)) { return true; } @@ -1423,7 +1423,7 @@ static bool ie_is_wps_ie(u8 **wpsie, u8 **tlvs, int *tlvs_len) u8 *ie = *wpsie; if ((ie[1] >= 4) && - !bcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x04"), 4)) { + !memcmp((const void *)&ie[2], (const void *)(WPA_OUI "\x04"), 4)) { return true; } @@ -2669,7 +2669,7 @@ wl_iw_set_pmksa(struct net_device *dev, } for (i = 0; i < pmkid_list.pmkids.npmkid; i++) - if (!bcmp + if (!memcmp (&iwpmksa->bssid.sa_data[0], &pmkid_list.pmkids.pmkid[i].BSSID, ETHER_ADDR_LEN)) break; @@ -2692,7 +2692,7 @@ wl_iw_set_pmksa(struct net_device *dev, else if (iwpmksa->cmd == IW_PMKSA_ADD) { for (i = 0; i < pmkid_list.pmkids.npmkid; i++) - if (!bcmp + if (!memcmp (&iwpmksa->bssid.sa_data[0], &pmkid_list.pmkids.pmkid[i].BSSID, ETHER_ADDR_LEN)) break; diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h index ec1c51119637..c2edea4649cb 100644 --- a/drivers/staging/brcm80211/include/linux_osl.h +++ b/drivers/staging/brcm80211/include/linux_osl.h @@ -101,7 +101,6 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size, #endif /* bcopy's: Linux kernel doesn't provide these (anymore) */ #define bcopy(src, dst, len) memcpy((dst), (src), (len)) -#define bcmp(b1, b2, len) memcmp((b1), (b2), (len)) /* register access macros */ #if defined(OSLREGOPS) @@ -201,7 +200,6 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size, #define OR_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) | (v)) #define bcopy(src, dst, len) memcpy((dst), (src), (len)) -#define bcmp(b1, b2, len) memcmp((b1), (b2), (len)) /* uncached/cached virtual address */ #ifdef __mips__ diff --git a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c index 6ea4df64d18e..574d4f3a2084 100644 --- a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c +++ b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c @@ -167,7 +167,7 @@ char *phy_getvar(phy_info_t *pi, const char *name) return NULL; for (s = vars; s && *s;) { - if ((bcmp(s, name, len) == 0) && (s[len] == '=')) + if ((memcmp(s, name, len) == 0) && (s[len] == '=')) return &s[len + 1]; while (*s++) diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h index 72a9236d8d86..2a6cf2ab19dd 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.h +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h @@ -813,7 +813,7 @@ struct antsel_info { dma_getnexttxp((wlc)->hw->di[(_queue)], HNDDMA_RANGE_TRANSMITTED) #define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \ - ((len1 == len2) && !bcmp(ssid1, ssid2, len1)) + ((len1 == len2) && !memcmp(ssid1, ssid2, len1)) extern void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus); extern void wlc_fatal_error(wlc_info_t *wlc); diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index 77098465d541..3a0beb93c0b6 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c @@ -131,7 +131,7 @@ static int varbuf_append(varbuf_t *b, const char *fmt, ...) if (s != NULL) { len = (size_t) (s - b->buf); for (s = b->base; s < b->buf;) { - if ((bcmp(s, b->buf, len) == 0) && s[len] == '=') { + if ((memcmp(s, b->buf, len) == 0) && s[len] == '=') { len = strlen(s) + 1; memmove(s, (s + len), ((b->buf + r + 1) - (s + len))); diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c index 64d1440a5041..9c4d46764aca 100644 --- a/drivers/staging/brcm80211/util/bcmutils.c +++ b/drivers/staging/brcm80211/util/bcmutils.c @@ -379,7 +379,7 @@ char *getvar(char *vars, const char *name) /* first look in vars[] */ for (s = vars; s && *s;) { - if ((bcmp(s, name, len) == 0) && (s[len] == '=')) + if ((memcmp(s, name, len) == 0) && (s[len] == '=')) return &s[len + 1]; while (*s++) diff --git a/drivers/staging/brcm80211/util/nvram/nvram_ro.c b/drivers/staging/brcm80211/util/nvram/nvram_ro.c index 2521c5b19192..e4d41ee78e2a 100644 --- a/drivers/staging/brcm80211/util/nvram/nvram_ro.c +++ b/drivers/staging/brcm80211/util/nvram/nvram_ro.c @@ -133,7 +133,7 @@ static char *findvar(char *vars, char *lim, const char *name) len = strlen(name); for (s = vars; (s < lim) && *s;) { - if ((bcmp(s, name, len) == 0) && (s[len] == '=')) + if ((memcmp(s, name, len) == 0) && (s[len] == '=')) return &s[len + 1]; while (*s++)