mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-09 23:57:10 +00:00
Fix ieee80211.h linux capabilities
This commit is contained in:
parent
8807b5e46b
commit
65e47eab43
@ -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;
|
status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION;
|
||||||
|
|
||||||
if (!sta->wpa2_group_cipher)
|
if (!sta->wpa2_group_cipher)
|
||||||
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
|
||||||
|
|
||||||
if (!sta->wpa2_pairwise_cipher)
|
if (!sta->wpa2_pairwise_cipher)
|
||||||
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
|
||||||
} else
|
} else
|
||||||
status = WLAN_STATUS_INVALID_IE;
|
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;
|
sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher;
|
||||||
|
|
||||||
if (!sta->wpa_group_cipher)
|
if (!sta->wpa_group_cipher)
|
||||||
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
|
||||||
|
|
||||||
if (!sta->wpa_pairwise_cipher)
|
if (!sta->wpa_pairwise_cipher)
|
||||||
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
|
||||||
} else
|
} else
|
||||||
status = WLAN_STATUS_INVALID_IE;
|
status = WLAN_STATUS_INVALID_IE;
|
||||||
|
|
||||||
@ -5468,4 +5468,3 @@ exit:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_AP_MODE */
|
#endif /* CONFIG_AP_MODE */
|
||||||
|
|
||||||
|
5470
core/rtw_ap.c.orig
Normal file
5470
core/rtw_ap.c.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -1394,7 +1394,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||||||
elems->timeout_int = pos;
|
elems->timeout_int = pos;
|
||||||
elems->timeout_int_len = elen;
|
elems->timeout_int_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_HT_CAP:
|
case WLAN_EID_HT_CAPABILITY:
|
||||||
elems->ht_capabilities = pos;
|
elems->ht_capabilities = pos;
|
||||||
elems->ht_capabilities_len = elen;
|
elems->ht_capabilities_len = elen;
|
||||||
break;
|
break;
|
||||||
@ -1410,7 +1410,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||||||
elems->vht_operation = pos;
|
elems->vht_operation = pos;
|
||||||
elems->vht_operation_len = elen;
|
elems->vht_operation_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_VHT_OP_MODE_NOTIFY:
|
case WLAN_EID_OPMODE_NOTIF:
|
||||||
elems->vht_op_mode_notify = pos;
|
elems->vht_op_mode_notify = pos;
|
||||||
elems->vht_op_mode_notify_len = elen;
|
elems->vht_op_mode_notify_len = elen;
|
||||||
break;
|
break;
|
||||||
@ -1653,7 +1653,7 @@ void dump_ht_cap_ie(void *sel, const u8 *ie, u32 ie_len)
|
|||||||
const u8 *ht_cap_ie;
|
const u8 *ht_cap_ie;
|
||||||
sint ht_cap_ielen;
|
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)
|
if (!ie || ht_cap_ie != ie)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
2878
core/rtw_ieee80211.c.orig
Normal file
2878
core/rtw_ieee80211.c.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,14 +15,8 @@
|
|||||||
#ifndef __IEEE80211_H
|
#ifndef __IEEE80211_H
|
||||||
#define __IEEE80211_H
|
#define __IEEE80211_H
|
||||||
|
|
||||||
|
#if defined(PLATFORM_LINUX) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
|
||||||
#ifndef CONFIG_RTL8711FW
|
#include <linux/ieee80211.h>
|
||||||
|
|
||||||
#if defined PLATFORM_OS_XP
|
|
||||||
#include <ntstrsafe.h>
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MGMT_QUEUE_NUM 5
|
#define MGMT_QUEUE_NUM 5
|
||||||
@ -711,6 +705,7 @@ struct ieee80211_snap_hdr {
|
|||||||
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
|
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
|
||||||
|
|
||||||
/* Status codes */
|
/* Status codes */
|
||||||
|
#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
|
||||||
#define WLAN_STATUS_SUCCESS 0
|
#define WLAN_STATUS_SUCCESS 0
|
||||||
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
|
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
|
||||||
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
|
#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_MAC_EXISTS_IN_MBSS 64
|
||||||
#define WLAN_REASON_MESH_CHAN_REGULATORY 65
|
#define WLAN_REASON_MESH_CHAN_REGULATORY 65
|
||||||
#define WLAN_REASON_MESH_CHAN 66
|
#define WLAN_REASON_MESH_CHAN 66
|
||||||
|
#endif
|
||||||
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532
|
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532
|
||||||
#define WLAN_REASON_ACTIVE_ROAM 65533
|
#define WLAN_REASON_ACTIVE_ROAM 65533
|
||||||
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
|
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
|
||||||
@ -765,6 +761,7 @@ struct ieee80211_snap_hdr {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/* Information Element IDs */
|
/* Information Element IDs */
|
||||||
|
#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
|
||||||
#define WLAN_EID_SSID 0
|
#define WLAN_EID_SSID 0
|
||||||
#define WLAN_EID_SUPP_RATES 1
|
#define WLAN_EID_SUPP_RATES 1
|
||||||
#define WLAN_EID_FH_PARAMS 2
|
#define WLAN_EID_FH_PARAMS 2
|
||||||
@ -786,7 +783,7 @@ struct ieee80211_snap_hdr {
|
|||||||
#define WLAN_EID_IBSS_DFS 41
|
#define WLAN_EID_IBSS_DFS 41
|
||||||
/* EIDs defined by IEEE 802.11h - END */
|
/* EIDs defined by IEEE 802.11h - END */
|
||||||
#define WLAN_EID_ERP_INFO 42
|
#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_RSN 48
|
||||||
#define WLAN_EID_EXT_SUPP_RATES 50
|
#define WLAN_EID_EXT_SUPP_RATES 50
|
||||||
#define WLAN_EID_MOBILITY_DOMAIN 54
|
#define WLAN_EID_MOBILITY_DOMAIN 54
|
||||||
@ -809,23 +806,22 @@ struct ieee80211_snap_hdr {
|
|||||||
#define WLAN_EID_AMPE 139
|
#define WLAN_EID_AMPE 139
|
||||||
#define WLAN_EID_MIC 140
|
#define WLAN_EID_MIC 140
|
||||||
#define WLAN_EID_VENDOR_SPECIFIC 221
|
#define WLAN_EID_VENDOR_SPECIFIC 221
|
||||||
#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
|
|
||||||
#define WLAN_EID_VHT_CAPABILITY 191
|
#define WLAN_EID_VHT_CAPABILITY 191
|
||||||
#define WLAN_EID_VHT_OPERATION 192
|
#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_MGMT_HDR_LEN 24
|
||||||
#define IEEE80211_DATA_HDR3_LEN 24
|
#define IEEE80211_DATA_HDR3_LEN 24
|
||||||
#define IEEE80211_DATA_HDR4_LEN 30
|
#define IEEE80211_DATA_HDR4_LEN 30
|
||||||
|
|
||||||
|
|
||||||
#define IEEE80211_STATMASK_SIGNAL (1<<0)
|
#define IEEE80211_STATMASK_SIGNAL (1<<0)
|
||||||
#define IEEE80211_STATMASK_RSSI (1<<1)
|
#define IEEE80211_STATMASK_RSSI (1<<1)
|
||||||
#define IEEE80211_STATMASK_NOISE (1<<2)
|
#define IEEE80211_STATMASK_NOISE (1<<2)
|
||||||
#define IEEE80211_STATMASK_RATE (1<<3)
|
#define IEEE80211_STATMASK_RATE (1<<3)
|
||||||
#define IEEE80211_STATMASK_WEMASK 0x7
|
#define IEEE80211_STATMASK_WEMASK 0x7
|
||||||
|
|
||||||
|
|
||||||
#define IEEE80211_CCK_MODULATION (1<<0)
|
#define IEEE80211_CCK_MODULATION (1<<0)
|
||||||
#define IEEE80211_OFDM_MODULATION (1<<1)
|
#define IEEE80211_OFDM_MODULATION (1<<1)
|
||||||
|
|
||||||
@ -835,7 +831,6 @@ struct ieee80211_snap_hdr {
|
|||||||
#define IEEE80211_CCK_RATE_LEN 4
|
#define IEEE80211_CCK_RATE_LEN 4
|
||||||
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
||||||
|
|
||||||
|
|
||||||
#define IEEE80211_CCK_RATE_1MB 0x02
|
#define IEEE80211_CCK_RATE_1MB 0x02
|
||||||
#define IEEE80211_CCK_RATE_2MB 0x04
|
#define IEEE80211_CCK_RATE_2MB 0x04
|
||||||
#define IEEE80211_CCK_RATE_5MB 0x0B
|
#define IEEE80211_CCK_RATE_5MB 0x0B
|
||||||
@ -888,7 +883,6 @@ struct ieee80211_snap_hdr {
|
|||||||
#define IEEE80211_NUM_CCK_RATES 4
|
#define IEEE80211_NUM_CCK_RATES 4
|
||||||
#define IEEE80211_OFDM_SHIFT_MASK_A 4
|
#define IEEE80211_OFDM_SHIFT_MASK_A 4
|
||||||
|
|
||||||
|
|
||||||
enum MGN_RATE {
|
enum MGN_RATE {
|
||||||
MGN_1M = 0x02,
|
MGN_1M = 0x02,
|
||||||
MGN_2M = 0x04,
|
MGN_2M = 0x04,
|
||||||
|
@ -215,6 +215,7 @@ enum WIFI_STATUS_CODE {
|
|||||||
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
|
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
|
||||||
#endif
|
#endif
|
||||||
/* entended */
|
/* entended */
|
||||||
|
#if !defined(PLATFORM_LINUX) || LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
|
||||||
/* IEEE 802.11b */
|
/* IEEE 802.11b */
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
|
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
|
#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
|
||||||
@ -232,16 +233,17 @@ enum WIFI_STATUS_CODE {
|
|||||||
#define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
|
#define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
|
||||||
/* IEEE 802.11i */
|
/* IEEE 802.11i */
|
||||||
#define WLAN_STATUS_INVALID_IE 40
|
#define WLAN_STATUS_INVALID_IE 40
|
||||||
#define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
|
#define WLAN_STATUS_INVALID_GROUP_CIPHER 41
|
||||||
#define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
|
#define WLAN_STATUS_INVALID_PAIRWISE_CIPHER 42
|
||||||
#define WLAN_STATUS_AKMP_NOT_VALID 43
|
#define WLAN_STATUS_INVALID_AKMP 43
|
||||||
#define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
|
#define WLAN_STATUS_UNSUPP_RSN_VERSION 44
|
||||||
#define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
|
#define WLAN_STATUS_INVALID_RSN_IE_CAP 45
|
||||||
#define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
|
#define WLAN_STATUS_CIPHER_SUITE_REJECTED 46
|
||||||
#define WLAN_STATUS_TS_NOT_CREATED 47
|
#define WLAN_STATUS_WAIT_TS_DELAY 47
|
||||||
#define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
|
#define WLAN_STATUS_NO_DIRECT_LINK 48
|
||||||
#define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
|
#define WLAN_STATUS_STA_NOT_PRESENT 49
|
||||||
#define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
|
#define WLAN_STATUS_STA_NOT_QSTA 50
|
||||||
|
#endif
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
|
#define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
|
||||||
/* IEEE 802.11r */
|
/* IEEE 802.11r */
|
||||||
#define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
|
#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_MDIE 54
|
||||||
#define WLAN_STATUS_INVALID_FTIE 55
|
#define WLAN_STATUS_INVALID_FTIE 55
|
||||||
|
|
||||||
|
|
||||||
enum WIFI_REG_DOMAIN {
|
enum WIFI_REG_DOMAIN {
|
||||||
DOMAIN_FCC = 1,
|
DOMAIN_FCC = 1,
|
||||||
DOMAIN_IC = 2,
|
DOMAIN_IC = 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user