diff options
author | Jouni Malinen <jkmaline@cc.hut.fi> | 2005-07-30 23:43:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-07-31 00:28:02 -0400 |
commit | ebed67d2847a9d299b47eeb5d82744671ab2b198 (patch) | |
tree | 9565c6fdaa7745669ec11087e259544cc6b31d2f /drivers/net/wireless/hostap/hostap_common.h | |
parent | f3b10e1636dec053f4874d593e3de5d46da48a5f (diff) |
[PATCH] hostap: Start using net/ieee80211.h
Preparations for starting to use net/ieee80211 instead of private
IEEE 802.11 implementation. Include net/ieee80211.h and
net/ieee80211_crypt.h into files that will be needed these in the
future. Remove duplicate definitions from hostap_common.h and
rename WLAN_FC_GET_{TYPE,STYPE} macros for now sinc net/ieee80211.h
is using incompatible definitions. This will be resolved in the
future by updating Host AP to use the versions that do not shift
type/stype.
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_common.h')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_common.h | 73 |
1 files changed, 7 insertions, 66 deletions
diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h index feec70e68d4e..3b79d9e95e6f 100644 --- a/drivers/net/wireless/hostap/hostap_common.h +++ b/drivers/net/wireless/hostap/hostap_common.h | |||
@@ -27,14 +27,14 @@ | |||
27 | #define WLAN_FC_ISWEP BIT(14) | 27 | #define WLAN_FC_ISWEP BIT(14) |
28 | #define WLAN_FC_ORDER BIT(15) | 28 | #define WLAN_FC_ORDER BIT(15) |
29 | 29 | ||
30 | #define WLAN_FC_GET_TYPE(fc) (((fc) & (BIT(3) | BIT(2))) >> 2) | 30 | /* |
31 | #define WLAN_FC_GET_STYPE(fc) \ | 31 | * To be replaced with ieee80211.h WLAN_FC_GET_* once HostAP code is updated to |
32 | * use the versions without right shift. | ||
33 | */ | ||
34 | #define HOSTAP_FC_GET_TYPE(fc) (((fc) & (BIT(3) | BIT(2))) >> 2) | ||
35 | #define HOSTAP_FC_GET_STYPE(fc) \ | ||
32 | (((fc) & (BIT(7) | BIT(6) | BIT(5) | BIT(4))) >> 4) | 36 | (((fc) & (BIT(7) | BIT(6) | BIT(5) | BIT(4))) >> 4) |
33 | 37 | ||
34 | #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0))) | ||
35 | #define WLAN_GET_SEQ_SEQ(seq) \ | ||
36 | (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4) | ||
37 | |||
38 | #define WLAN_FC_TYPE_MGMT 0 | 38 | #define WLAN_FC_TYPE_MGMT 0 |
39 | #define WLAN_FC_TYPE_CTRL 1 | 39 | #define WLAN_FC_TYPE_CTRL 1 |
40 | #define WLAN_FC_TYPE_DATA 2 | 40 | #define WLAN_FC_TYPE_DATA 2 |
@@ -70,66 +70,7 @@ | |||
70 | #define WLAN_FC_STYPE_CFPOLL 6 | 70 | #define WLAN_FC_STYPE_CFPOLL 6 |
71 | #define WLAN_FC_STYPE_CFACKPOLL 7 | 71 | #define WLAN_FC_STYPE_CFACKPOLL 7 |
72 | 72 | ||
73 | /* Authentication algorithms */ | 73 | #define WLAN_CAPABILITY_ESS WLAN_CAPABILITY_BSS |
74 | #define WLAN_AUTH_OPEN 0 | ||
75 | #define WLAN_AUTH_SHARED_KEY 1 | ||
76 | |||
77 | #define WLAN_AUTH_CHALLENGE_LEN 128 | ||
78 | |||
79 | #define WLAN_CAPABILITY_ESS BIT(0) | ||
80 | #define WLAN_CAPABILITY_IBSS BIT(1) | ||
81 | #define WLAN_CAPABILITY_CF_POLLABLE BIT(2) | ||
82 | #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3) | ||
83 | #define WLAN_CAPABILITY_PRIVACY BIT(4) | ||
84 | |||
85 | /* Status codes */ | ||
86 | #define WLAN_STATUS_SUCCESS 0 | ||
87 | #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 | ||
88 | #define WLAN_STATUS_CAPS_UNSUPPORTED 10 | ||
89 | #define WLAN_STATUS_REASSOC_NO_ASSOC 11 | ||
90 | #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 | ||
91 | #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 | ||
92 | #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 | ||
93 | #define WLAN_STATUS_CHALLENGE_FAIL 15 | ||
94 | #define WLAN_STATUS_AUTH_TIMEOUT 16 | ||
95 | #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 | ||
96 | #define WLAN_STATUS_ASSOC_DENIED_RATES 18 | ||
97 | /* 802.11b */ | ||
98 | #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 | ||
99 | #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 | ||
100 | #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 | ||
101 | /* IEEE 802.11i */ | ||
102 | #define WLAN_STATUS_INVALID_IE 40 | ||
103 | #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41 | ||
104 | #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42 | ||
105 | #define WLAN_STATUS_AKMP_NOT_VALID 43 | ||
106 | #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44 | ||
107 | #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45 | ||
108 | #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46 | ||
109 | |||
110 | /* Reason codes */ | ||
111 | #define WLAN_REASON_UNSPECIFIED 1 | ||
112 | #define WLAN_REASON_PREV_AUTH_NOT_VALID 2 | ||
113 | #define WLAN_REASON_DEAUTH_LEAVING 3 | ||
114 | #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 | ||
115 | #define WLAN_REASON_DISASSOC_AP_BUSY 5 | ||
116 | #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 | ||
117 | #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 | ||
118 | #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 | ||
119 | #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 | ||
120 | /* IEEE 802.11i */ | ||
121 | #define WLAN_REASON_INVALID_IE 13 | ||
122 | #define WLAN_REASON_MICHAEL_MIC_FAILURE 14 | ||
123 | #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15 | ||
124 | #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16 | ||
125 | #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17 | ||
126 | #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18 | ||
127 | #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19 | ||
128 | #define WLAN_REASON_AKMP_NOT_VALID 20 | ||
129 | #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21 | ||
130 | #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22 | ||
131 | #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23 | ||
132 | #define WLAN_REASON_CIPHER_SUITE_REJECTED 24 | ||
133 | 74 | ||
134 | 75 | ||
135 | /* Information Element IDs */ | 76 | /* Information Element IDs */ |