staging: rtl8723au: Remove multiple duplicate defines of the WPA OUI
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 15 Apr 2014 17:44:11 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 18:04:03 +0000 (11:04 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_ieee80211.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c
drivers/staging/rtl8723au/include/osdep_service.h
drivers/staging/rtl8723au/include/rtw_mlme_ext.h

index d049ba7..bbf8b2e 100644 (file)
@@ -21,7 +21,6 @@
 
 #ifdef CONFIG_8723AU_AP_MODE
 
-extern unsigned char RTW_WPA_OUI23A[];
 extern unsigned char WMM_OUI23A[];
 extern unsigned char WPS_OUI23A[];
 extern unsigned char P2P_OUI23A[];
@@ -1303,7 +1302,7 @@ static void update_bcn_vendor_spec_ie(struct rtw_adapter *padapter, u8*oui)
 {
        DBG_8723A("%s\n", __func__);
 
-       if (!memcmp(RTW_WPA_OUI23A, oui, 4))
+       if (!memcmp(RTW_WPA_OUI23A_TYPE, oui, 4))
        {
                update_bcn_wpa_ie(padapter);
        }
index 930a9b1..8fc54c8 100644 (file)
@@ -497,7 +497,6 @@ int rtw_parse_wpa_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int
        int i, ret = _SUCCESS;
        int left, count;
        const u8 *pos;
-       u8 SUITE_1X[4] = {0x00, 0x50, 0xf2, 1};
 
        if (wpa_ie_len <= 0) {
                /* No WPA IE - fail silently */
@@ -560,7 +559,7 @@ int rtw_parse_wpa_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int
        if (is_8021x) {
                if (left >= 6) {
                        pos += 2;
-                       if (!memcmp(pos, SUITE_1X, 4)) {
+                       if (!memcmp(pos, RTW_WPA_OUI23A_TYPE, 4)) {
                                RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
                                         ("%s : there has 802.1x auth\n",
                                          __func__));
@@ -653,11 +652,9 @@ int rtw_get_sec_ie23a(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
                   u8 *wpa_ie, u16 *wpa_len)
 {
        u8 authmode, sec_idx, i;
-       u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
        uint cnt;
 
 
-
        /* Search required WPA or WPA2 IE and copy to sec_ie[ ] */
 
        cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
@@ -668,7 +665,7 @@ int rtw_get_sec_ie23a(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
                authmode = in_ie[cnt];
 
                if ((authmode == WLAN_EID_VENDOR_SPECIFIC) &&
-                   !memcmp(&in_ie[cnt+2], &wpa_oui[0], 4)) {
+                   !memcmp(&in_ie[cnt+2], RTW_WPA_OUI23A_TYPE, 4)) {
                                RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
                                         ("\n rtw_get_wpa_ie23a: sec_idx =%d "
                                          "in_ie[cnt+1]+2 =%d\n",
index a79861e..d08f12f 100644 (file)
@@ -87,7 +87,6 @@ static u8     null_addr[ETH_ALEN]= {0, 0, 0, 0, 0, 0};
 /**************************************************
 OUI definitions for the vendor specific IE
 ***************************************************/
-unsigned char  RTW_WPA_OUI23A[] = {0x00, 0x50, 0xf2, 0x01};
 unsigned char WMM_OUI23A[] = {0x00, 0x50, 0xf2, 0x02};
 unsigned char  WPS_OUI23A[] = {0x00, 0x50, 0xf2, 0x04};
 unsigned char  P2P_OUI23A[] = {0x50, 0x6F, 0x9A, 0x09};
@@ -3366,7 +3365,7 @@ void issue_assocreq23a(struct rtw_adapter *padapter)
                switch (pIE->ElementID)
                {
                case WLAN_EID_VENDOR_SPECIFIC:
-                       if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4) ||
+                       if (!memcmp(pIE->data, RTW_WPA_OUI23A_TYPE, 4) ||
                            !memcmp(pIE->data, WMM_OUI23A, 4) ||
                            !memcmp(pIE->data, WPS_OUI23A, 4)) {
                                if (!padapter->registrypriv.wifi_spec) {
index e8127cb..84753f5 100644 (file)
@@ -1145,7 +1145,7 @@ unsigned int is_ap_in_tkip23a(struct rtw_adapter *padapter)
 
                        switch (pIE->ElementID) {
                        case WLAN_EID_VENDOR_SPECIFIC:
-                               if ((!memcmp(pIE->data, RTW_WPA_OUI23A, 4)) && (!memcmp((pIE->data + 12), WPA_TKIP_CIPHER23A, 4)))
+                               if ((!memcmp(pIE->data, RTW_WPA_OUI23A_TYPE, 4)) && (!memcmp((pIE->data + 12), WPA_TKIP_CIPHER23A, 4)))
                                        return true;
                                break;
                        case WLAN_EID_RSN:
@@ -1176,7 +1176,7 @@ unsigned int should_forbid_n_rate23a(struct rtw_adapter * padapter)
 
                        switch (pIE->ElementID) {
                        case WLAN_EID_VENDOR_SPECIFIC:
-                               if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4) &&
+                               if (!memcmp(pIE->data, RTW_WPA_OUI23A_TYPE, 4) &&
                                        ((!memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP23A, 4)) ||
                                          (!memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP23A, 4))))
                                        return false;
@@ -1211,7 +1211,7 @@ unsigned int is_ap_in_wep23a(struct rtw_adapter *padapter)
 
                        switch (pIE->ElementID) {
                        case WLAN_EID_VENDOR_SPECIFIC:
-                               if (!memcmp(pIE->data, RTW_WPA_OUI23A, 4))
+                               if (!memcmp(pIE->data, RTW_WPA_OUI23A_TYPE, 4))
                                        return false;
                                break;
                        case WLAN_EID_RSN:
index 92c954e..40445bb 100644 (file)
@@ -137,7 +137,6 @@ void        _rtw_vmfree(u8 *pbuf, u32 sz);
 
 extern unsigned char REALTEK_96B_IE23A[];
 extern unsigned char MCS_rate_2R23A[16];
-extern unsigned char RTW_WPA_OUI23A[];
 extern unsigned char WPA_TKIP_CIPHER23A[4];
 extern unsigned char RSN_TKIP_CIPHER23A[4];
 
index 275f891..13f580d 100644 (file)
@@ -89,7 +89,6 @@
 #define                _54M_RATE_      11
 
 
-extern unsigned char RTW_WPA_OUI23A[];
 extern unsigned char WMM_OUI23A[];
 extern unsigned char WPS_OUI23A[];
 extern unsigned char WFD_OUI23A[];