1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00

Fix ieee80211.h linux capabilities

This commit is contained in:
kimocoder 2019-08-17 14:32:08 +02:00
parent 8807b5e46b
commit 65e47eab43
66 changed files with 8376 additions and 34 deletions

View File

@ -5216,10 +5216,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION;
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;
@ -5236,10 +5236,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;
@ -5468,4 +5468,3 @@ exit:
return;
}
#endif /* CONFIG_AP_MODE */

5470
core/rtw_ap.c.orig Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1394,7 +1394,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;
@ -1410,7 +1410,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;
@ -1653,7 +1653,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;

2878
core/rtw_ieee80211.c.orig Normal file

File diff suppressed because it is too large Load Diff

View File

@ -15,14 +15,8 @@
#ifndef __IEEE80211_H
#define __IEEE80211_H
#ifndef CONFIG_RTL8711FW
#if defined PLATFORM_OS_XP
#include <ntstrsafe.h>
#endif
#else
#if defined(PLATFORM_LINUX) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
#include <linux/ieee80211.h>
#endif
#define MGMT_QUEUE_NUM 5
@ -711,6 +705,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
@ -752,6 +747,7 @@ struct ieee80211_snap_hdr {
#define WLAN_REASON_MAC_EXISTS_IN_MBSS 64
#define WLAN_REASON_MESH_CHAN_REGULATORY 65
#define WLAN_REASON_MESH_CHAN 66
#endif
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532
#define WLAN_REASON_ACTIVE_ROAM 65533
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
@ -765,6 +761,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
@ -786,7 +783,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
@ -809,23 +806,22 @@ 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
#define IEEE80211_DATA_HDR4_LEN 30
#define IEEE80211_STATMASK_SIGNAL (1<<0)
#define IEEE80211_STATMASK_RSSI (1<<1)
#define IEEE80211_STATMASK_NOISE (1<<2)
#define IEEE80211_STATMASK_RATE (1<<3)
#define IEEE80211_STATMASK_WEMASK 0x7
#define IEEE80211_CCK_MODULATION (1<<0)
#define IEEE80211_OFDM_MODULATION (1<<1)
@ -835,7 +831,6 @@ struct ieee80211_snap_hdr {
#define IEEE80211_CCK_RATE_LEN 4
#define IEEE80211_NUM_OFDM_RATESLEN 8
#define IEEE80211_CCK_RATE_1MB 0x02
#define IEEE80211_CCK_RATE_2MB 0x04
#define IEEE80211_CCK_RATE_5MB 0x0B
@ -888,7 +883,6 @@ struct ieee80211_snap_hdr {
#define IEEE80211_NUM_CCK_RATES 4
#define IEEE80211_OFDM_SHIFT_MASK_A 4
enum MGN_RATE {
MGN_1M = 0x02,
MGN_2M = 0x04,

View File

@ -215,6 +215,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
@ -232,16 +233,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
@ -249,7 +251,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,