diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 442a332..d8a8e7f 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -4740,10 +4740,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct sta->wpa2_pairwise_cipher = pairwise_cipher & sec->wpa2_pairwise_cipher; if (!sta->wpa2_group_cipher) - status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_GROUP_CIPHER; if (!sta->wpa2_pairwise_cipher) - status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER; } else status = WLAN_STATUS_INVALID_IE; @@ -4760,10 +4760,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher; if (!sta->wpa_group_cipher) - status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_GROUP_CIPHER; if (!sta->wpa_pairwise_cipher) - status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID; + status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER; } else status = WLAN_STATUS_INVALID_IE; diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 4609336..2edd0ae 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -1287,7 +1287,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, elems->timeout_int = pos; elems->timeout_int_len = elen; break; - case WLAN_EID_HT_CAP: + case WLAN_EID_HT_CAPABILITY: elems->ht_capabilities = pos; elems->ht_capabilities_len = elen; break; @@ -1303,7 +1303,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, elems->vht_operation = pos; elems->vht_operation_len = elen; break; - case WLAN_EID_VHT_OP_MODE_NOTIFY: + case WLAN_EID_OPMODE_NOTIF: elems->vht_op_mode_notify = pos; elems->vht_op_mode_notify_len = elen; break; @@ -1550,7 +1550,7 @@ void dump_ht_cap_ie(void *sel, const u8 *ie, u32 ie_len) const u8 *ht_cap_ie; sint ht_cap_ielen; - ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAP, &ht_cap_ielen, ie_len); + ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAPABILITY, &ht_cap_ielen, ie_len); if (!ie || ht_cap_ie != ie) return; diff --git a/include/ieee80211.h b/include/ieee80211.h index 5ba92b5..7bb71b4 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -15,6 +15,9 @@ #ifndef __IEEE80211_H #define __IEEE80211_H +#if defined(PLATFORM_LINUX) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#include +#endif #ifndef CONFIG_RTL8711FW @@ -627,6 +630,7 @@ struct ieee80211_snap_hdr { #define WLAN_CAPABILITY_SHORT_SLOT (1<<10) /* Status codes */ +#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) #define WLAN_STATUS_SUCCESS 0 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 #define WLAN_STATUS_CAPS_UNSUPPORTED 10 @@ -653,11 +657,12 @@ struct ieee80211_snap_hdr { #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 +#endif #define WLAN_REASON_MESH_PEER_CANCELED 52 #define WLAN_REASON_MESH_MAX_PEERS 53 #define WLAN_REASON_MESH_CONFIG 54 #define WLAN_REASON_MESH_CLOSE 55 -#define WLAN_REASON_MESH_MAX_RETRIES 56 +#define WLAN_REASON_MESH_MAX_RETRIES 56 #define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57 #define WLAN_REASON_MESH_INVALID_GTK 58 #define WLAN_REASON_MESH_INCONSISTENT_PARAM 59 @@ -681,6 +686,7 @@ struct ieee80211_snap_hdr { ) /* Information Element IDs */ +#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 #define WLAN_EID_FH_PARAMS 2 @@ -702,7 +708,7 @@ struct ieee80211_snap_hdr { #define WLAN_EID_IBSS_DFS 41 /* EIDs defined by IEEE 802.11h - END */ #define WLAN_EID_ERP_INFO 42 -#define WLAN_EID_HT_CAP 45 +#define WLAN_EID_HT_CAPABILITY 45 #define WLAN_EID_RSN 48 #define WLAN_EID_EXT_SUPP_RATES 50 #define WLAN_EID_MOBILITY_DOMAIN 54 @@ -725,10 +731,11 @@ struct ieee80211_snap_hdr { #define WLAN_EID_AMPE 139 #define WLAN_EID_MIC 140 #define WLAN_EID_VENDOR_SPECIFIC 221 -#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC) #define WLAN_EID_VHT_CAPABILITY 191 #define WLAN_EID_VHT_OPERATION 192 -#define WLAN_EID_VHT_OP_MODE_NOTIFY 199 +#define WLAN_EID_OPMODE_NOTIF 199 +#endif +#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC) #define IEEE80211_MGMT_HDR_LEN 24 #define IEEE80211_DATA_HDR3_LEN 24 diff --git a/include/wifi.h b/include/wifi.h index ff28e7d..8bd9cba 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -209,6 +209,7 @@ enum WIFI_STATUS_CODE { #define WLAN_STATUS_ASSOC_DENIED_RATES 18 #endif /* entended */ +#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) /* IEEE 802.11b */ #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 @@ -226,16 +227,17 @@ enum WIFI_STATUS_CODE { #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31 /* IEEE 802.11i */ #define WLAN_STATUS_INVALID_IE 40 -#define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41 -#define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42 -#define WLAN_STATUS_AKMP_NOT_VALID 43 -#define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44 -#define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45 -#define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46 -#define WLAN_STATUS_TS_NOT_CREATED 47 -#define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48 -#define WLAN_STATUS_DEST_STA_NOT_PRESENT 49 -#define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50 +#define WLAN_STATUS_INVALID_GROUP_CIPHER 41 +#define WLAN_STATUS_INVALID_PAIRWISE_CIPHER 42 +#define WLAN_STATUS_INVALID_AKMP 43 +#define WLAN_STATUS_UNSUPP_RSN_VERSION 44 +#define WLAN_STATUS_INVALID_RSN_IE_CAP 45 +#define WLAN_STATUS_CIPHER_SUITE_REJECTED 46 +#define WLAN_STATUS_WAIT_TS_DELAY 47 +#define WLAN_STATUS_NO_DIRECT_LINK 48 +#define WLAN_STATUS_STA_NOT_PRESENT 49 +#define WLAN_STATUS_STA_NOT_QSTA 50 +#endif #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51 /* IEEE 802.11r */ #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52 @@ -243,7 +245,6 @@ enum WIFI_STATUS_CODE { #define WLAN_STATUS_INVALID_MDIE 54 #define WLAN_STATUS_INVALID_FTIE 55 - enum WIFI_REG_DOMAIN { DOMAIN_FCC = 1, DOMAIN_IC = 2,