diff options
author | Larry Finger | 2014-02-09 22:15:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-02-11 21:41:13 +0100 |
commit | f42f52aaf922e5bae7775dd2c3b3954719ee5f08 (patch) | |
tree | be4a7581d0c0e78c0615f940cd919a2ee61f52e0 /drivers/staging/rtl8188eu/core/rtw_ap.c | |
parent | staging: slicoss: Add MAINTAINERS entry, break README into TODO & README (diff) | |
download | kernel-qcow2-linux-f42f52aaf922e5bae7775dd2c3b3954719ee5f08.tar.gz kernel-qcow2-linux-f42f52aaf922e5bae7775dd2c3b3954719ee5f08.tar.xz kernel-qcow2-linux-f42f52aaf922e5bae7775dd2c3b3954719ee5f08.zip |
staging: r8188eu: Replace wrapper around _rtw_memcmp()
This wrapper is replaced with a simple memcmp(). As the wrapper inverts the
logic of memcmp(), care needed to be taken.
This patch also adds one include of vmalloc.h that was missed in a previous
patch.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_ap.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_ap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 8ebe6bc40022..fe5ec8eba7f6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -980,7 +980,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) for (p = ie + _BEACON_IE_OFFSET_;; p += (ie_len + 2)) { p = rtw_get_ie(p, _SSN_IE_1_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); - if ((p) && (_rtw_memcmp(p+2, OUI1, 4))) { + if ((p) && (!memcmp(p+2, OUI1, 4))) { if (rtw_parse_wpa_ie(p, ie_len+2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) { psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; @@ -1005,7 +1005,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) for (p = ie + _BEACON_IE_OFFSET_;; p += (ie_len + 2)) { p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); - if ((p) && _rtw_memcmp(p+2, WMM_PARA_IE, 6)) { + if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) { pmlmepriv->qospriv.qos_option = 1; *(p+8) |= BIT(7);/* QoS Info, support U-APSD */ @@ -1150,7 +1150,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); - if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN)) { + if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { added = true; DBG_88E("%s, sta has been added\n", __func__); @@ -1211,7 +1211,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); - if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN)) { + if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { paclnode->valid = false; @@ -1351,13 +1351,13 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui) { DBG_88E("%s\n", __func__); - if (_rtw_memcmp(RTW_WPA_OUI, oui, 4)) + if (!memcmp(RTW_WPA_OUI, oui, 4)) update_bcn_wpa_ie(padapter); - else if (_rtw_memcmp(WMM_OUI, oui, 4)) + else if (!memcmp(WMM_OUI, oui, 4)) update_bcn_wmm_ie(padapter); - else if (_rtw_memcmp(WPS_OUI, oui, 4)) + else if (!memcmp(WPS_OUI, oui, 4)) update_bcn_wps_ie(padapter); - else if (_rtw_memcmp(P2P_OUI, oui, 4)) + else if (!memcmp(P2P_OUI, oui, 4)) update_bcn_p2p_ie(padapter); else DBG_88E("unknown OUI type!\n"); |