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 d049ba77090005ccbff51a4a321db91720a1e7c4..bbf8b2eabdb3c09e3836f1c69ec4ff50883a635d 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 930a9b189998ce9c8c770cbb9a4b3b3d95a8e79b..8fc54c806e7d25aac8ded73e1682d637fa6274e0 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 a79861e4250cd4845face6259d9991f5db240b0f..d08f12f6e9d3abdfd1f94c7689c5c86340c48ff8 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 e8127cb6c33a9dc333cbde293bb331598c63b475..84753f5ee2314d4f24338ce55f8f938c1fde4291 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 92c954eb21799b2c9ee31735a35d394234d28c3b..40445bbafe771f9dbedc849f76297f749e862cd7 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 275f891b6c641f717ea889896c99e44f9ac58185..13f580d9d96fe115d82977a7dbff2f9d0fc7ebb3 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[];