1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Fix ieee80211.h linux capability

This commit is contained in:
kimocoder 2019-03-29 00:05:10 +01:00
parent a180209d7e
commit d2cc038f43
4 changed files with 28 additions and 20 deletions

View File

@ -4506,10 +4506,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;
@ -4526,10 +4526,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;

View File

@ -1214,7 +1214,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;
@ -1230,7 +1230,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;

View File

@ -15,6 +15,9 @@
#ifndef __IEEE80211_H
#define __IEEE80211_H
#if defined(PLATFORM_LINUX) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
#include <linux/ieee80211.h>
#endif
#ifndef CONFIG_RTL8711FW
@ -605,6 +608,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
@ -631,11 +635,13 @@ 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_ACTIVE_ROAM 65533
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
#define WLAN_REASON_EXPIRATION_CHK 65535
/* 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
@ -657,7 +663,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
@ -671,10 +677,11 @@ struct ieee80211_snap_hdr {
#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
#define WLAN_EID_MMIE 76
#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

View File

@ -208,6 +208,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
@ -225,16 +226,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
@ -242,7 +244,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,