iPXE
net80211_err.h
Go to the documentation of this file.
00001 #ifndef _IPXE_NET80211_ERR_H
00002 #define _IPXE_NET80211_ERR_H
00003 
00004 #include <errno.h>
00005 #include <ipxe/ieee80211.h>
00006 
00007 /*
00008  * The iPXE 802.11 MAC layer.
00009  *
00010  * Copyright (c) 2009 Joshua Oreman <oremanj@rwcr.net>.
00011  */
00012 
00013 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00014 
00015 /** @file
00016  *
00017  * The iPXE 802.11 MAC layer errors.
00018  */
00019 
00020 /* Disambiguate the EINVAL's a bit */
00021 #define EINVAL_PKT_TOO_SHORT __einfo_error ( EINFO_EINVAL_PKT_TOO_SHORT )
00022 #define EINFO_EINVAL_PKT_TOO_SHORT __einfo_uniqify \
00023         ( EINFO_EINVAL, 0x01, "Packet too short" )
00024 #define EINVAL_PKT_VERSION __einfo_error ( EINFO_EINVAL_PKT_VERSION )
00025 #define EINFO_EINVAL_PKT_VERSION __einfo_uniqify \
00026         ( EINFO_EINVAL, 0x02, "Packet 802.11 version not supported" )
00027 #define EINVAL_PKT_NOT_DATA __einfo_error ( EINFO_EINVAL_PKT_NOT_DATA )
00028 #define EINFO_EINVAL_PKT_NOT_DATA __einfo_uniqify \
00029         ( EINFO_EINVAL, 0x03, "Packet not a data packet" )
00030 #define EINVAL_PKT_NOT_FROMDS __einfo_error ( EINFO_EINVAL_PKT_NOT_FROMDS )
00031 #define EINFO_EINVAL_PKT_NOT_FROMDS __einfo_uniqify \
00032         ( EINFO_EINVAL, 0x04, "Packet not from an Access Point" )
00033 #define EINVAL_PKT_LLC_HEADER __einfo_error ( EINFO_EINVAL_PKT_LLC_HEADER )
00034 #define EINFO_EINVAL_PKT_LLC_HEADER __einfo_uniqify \
00035         ( EINFO_EINVAL, 0x05, "Packet has invalid LLC header" )
00036 #define EINVAL_CRYPTO_REQUEST __einfo_error ( EINFO_EINVAL_CRYPTO_REQUEST )
00037 #define EINFO_EINVAL_CRYPTO_REQUEST __einfo_uniqify \
00038         ( EINFO_EINVAL, 0x06, "Packet decryption error" )
00039 #define EINVAL_ACTIVE_SCAN __einfo_error ( EINFO_EINVAL_ACTIVE_SCAN )
00040 #define EINFO_EINVAL_ACTIVE_SCAN __einfo_uniqify \
00041         ( EINFO_EINVAL, 0x07, "Invalid active scan requested" )
00042 
00043 /*
00044  * 802.11 error codes: The AP can give us a status code explaining why
00045  * authentication failed, or a reason code explaining why we were
00046  * deauthenticated/disassociated. These codes range from 0-63 (the
00047  * field is 16 bits wide, but only up to 45 or so are defined yet; we
00048  * allow up to 63 for extensibility). This is encoded into an error
00049  * code as such:
00050  *
00051  *                                      status & 0x1f goes here --vv--
00052  *   Status code 0-31:  ECONNREFUSED | EUNIQ_(status & 0x1f) (0e1a6038)
00053  *   Status code 32-63: EHOSTUNREACH | EUNIQ_(status & 0x1f) (171a6011)
00054  *   Reason code 0-31:  ECONNRESET | EUNIQ_(reason & 0x1f)   (0f1a6039)
00055  *   Reason code 32-63: ENETRESET | EUNIQ_(reason & 0x1f)    (271a6001)
00056  *
00057  * The POSIX error codes more or less convey the appropriate message
00058  * (status codes occur when we can't associate at all, reason codes
00059  * when we lose association unexpectedly) and let us extract the
00060  * complete 802.11 error code from the rc value.
00061  *
00062  * The error messages follow the 802.11 standard as much as is
00063  * feasible, but most have been abbreviated to fit the 50-character
00064  * limit imposed by strerror().
00065  */
00066 
00067 /* 802.11 status codes (IEEE Std 802.11-2007, Table 7-23) */
00068 
00069 #define ECONNREFUSED_FAILURE __einfo_error                              \
00070         ( EINFO_ECONNREFUSED_FAILURE )
00071 #define EINFO_ECONNREFUSED_FAILURE __einfo_uniqify                      \
00072         ( EINFO_ECONNREFUSED,                                           \
00073           ( IEEE80211_STATUS_FAILURE & 0x1f ),                          \
00074           "Unspecified failure" )
00075 
00076 #define ECONNREFUSED_CAPAB_UNSUPP __einfo_error                         \
00077         ( EINFO_ECONNREFUSED_CAPAB_UNSUPP )
00078 #define EINFO_ECONNREFUSED_CAPAB_UNSUPP __einfo_uniqify                 \
00079         ( EINFO_ECONNREFUSED,                                           \
00080           ( IEEE80211_STATUS_CAPAB_UNSUPP & 0x1f ),                     \
00081           "Cannot support all requested capabilities" )
00082 
00083 #define ECONNREFUSED_REASSOC_INVALID __einfo_error                      \
00084         ( EINFO_ECONNREFUSED_REASSOC_INVALID )
00085 #define EINFO_ECONNREFUSED_REASSOC_INVALID __einfo_uniqify              \
00086         ( EINFO_ECONNREFUSED,                                           \
00087           ( IEEE80211_STATUS_REASSOC_INVALID & 0x1f ),                  \
00088           "Reassociation denied due to lack of association" )
00089 
00090 #define ECONNREFUSED_ASSOC_DENIED __einfo_error                         \
00091         ( EINFO_ECONNREFUSED_ASSOC_DENIED )
00092 #define EINFO_ECONNREFUSED_ASSOC_DENIED __einfo_uniqify                 \
00093         ( EINFO_ECONNREFUSED,                                           \
00094           ( IEEE80211_STATUS_ASSOC_DENIED & 0x1f ),                     \
00095           "Association denied for another reason" )
00096 
00097 #define ECONNREFUSED_AUTH_ALGO_UNSUPP __einfo_error                     \
00098         ( EINFO_ECONNREFUSED_AUTH_ALGO_UNSUPP )
00099 #define EINFO_ECONNREFUSED_AUTH_ALGO_UNSUPP __einfo_uniqify             \
00100         ( EINFO_ECONNREFUSED,                                           \
00101           ( IEEE80211_STATUS_AUTH_ALGO_UNSUPP & 0x1f ),                 \
00102           "Authentication algorithm unsupported" )
00103 
00104 #define ECONNREFUSED_AUTH_SEQ_INVALID __einfo_error                     \
00105         ( EINFO_ECONNREFUSED_AUTH_SEQ_INVALID )
00106 #define EINFO_ECONNREFUSED_AUTH_SEQ_INVALID __einfo_uniqify             \
00107         ( EINFO_ECONNREFUSED,                                           \
00108           ( IEEE80211_STATUS_AUTH_SEQ_INVALID & 0x1f ),                 \
00109           "Authentication sequence number unexpected" )
00110 
00111 #define ECONNREFUSED_AUTH_CHALL_INVALID __einfo_error                   \
00112         ( EINFO_ECONNREFUSED_AUTH_CHALL_INVALID )
00113 #define EINFO_ECONNREFUSED_AUTH_CHALL_INVALID __einfo_uniqify           \
00114         ( EINFO_ECONNREFUSED,                                   \
00115           ( IEEE80211_STATUS_AUTH_CHALL_INVALID & 0x1f ),               \
00116           "Authentication rejected due to challenge failure" )
00117 
00118 #define ECONNREFUSED_AUTH_TIMEOUT __einfo_error                         \
00119         ( EINFO_ECONNREFUSED_AUTH_TIMEOUT )
00120 #define EINFO_ECONNREFUSED_AUTH_TIMEOUT __einfo_uniqify                 \
00121         ( EINFO_ECONNREFUSED,                                           \
00122           ( IEEE80211_STATUS_AUTH_TIMEOUT & 0x1f ),                     \
00123           "Authentication rejected due to timeout" )
00124 
00125 #define ECONNREFUSED_ASSOC_NO_ROOM __einfo_error                        \
00126         ( EINFO_ECONNREFUSED_ASSOC_NO_ROOM )
00127 #define EINFO_ECONNREFUSED_ASSOC_NO_ROOM __einfo_uniqify                \
00128         ( EINFO_ECONNREFUSED,                                           \
00129           ( IEEE80211_STATUS_ASSOC_NO_ROOM & 0x1f ),                    \
00130           "Association denied because AP is out of resources" )
00131 
00132 #define ECONNREFUSED_ASSOC_NEED_RATE __einfo_error                      \
00133         ( EINFO_ECONNREFUSED_ASSOC_NEED_RATE )
00134 #define EINFO_ECONNREFUSED_ASSOC_NEED_RATE __einfo_uniqify              \
00135         ( EINFO_ECONNREFUSED,                                           \
00136           ( IEEE80211_STATUS_ASSOC_NEED_RATE & 0x1f ),                  \
00137           "Association denied; basic rate support required" )
00138 
00139 #define ECONNREFUSED_ASSOC_NEED_SHORT_PMBL __einfo_error                \
00140         ( EINFO_ECONNREFUSED_ASSOC_NEED_SHORT_PMBL )
00141 #define EINFO_ECONNREFUSED_ASSOC_NEED_SHORT_PMBL __einfo_uniqify        \
00142         ( EINFO_ECONNREFUSED,                                           \
00143           ( IEEE80211_STATUS_ASSOC_NEED_SHORT_PMBL & 0x1f ),            \
00144           "Association denied; short preamble support req'd" )
00145 
00146 #define ECONNREFUSED_ASSOC_NEED_PBCC __einfo_error                      \
00147         ( EINFO_ECONNREFUSED_ASSOC_NEED_PBCC )
00148 #define EINFO_ECONNREFUSED_ASSOC_NEED_PBCC __einfo_uniqify              \
00149         ( EINFO_ECONNREFUSED,                                           \
00150           ( IEEE80211_STATUS_ASSOC_NEED_PBCC & 0x1f ),                  \
00151           "Association denied; PBCC modulation support req'd" )
00152 
00153 #define ECONNREFUSED_ASSOC_NEED_CHAN_AGILITY __einfo_error              \
00154         ( EINFO_ECONNREFUSED_ASSOC_NEED_CHAN_AGILITY )
00155 #define EINFO_ECONNREFUSED_ASSOC_NEED_CHAN_AGILITY __einfo_uniqify      \
00156         ( EINFO_ECONNREFUSED,                                           \
00157           ( IEEE80211_STATUS_ASSOC_NEED_CHAN_AGILITY & 0x1f ),          \
00158           "Association denied; Channel Agility support req'd" )
00159 
00160 #define ECONNREFUSED_ASSOC_NEED_SPECTRUM_MGMT __einfo_error             \
00161         ( EINFO_ECONNREFUSED_ASSOC_NEED_SPECTRUM_MGMT )
00162 #define EINFO_ECONNREFUSED_ASSOC_NEED_SPECTRUM_MGMT __einfo_uniqify     \
00163         ( EINFO_ECONNREFUSED,                                           \
00164           ( IEEE80211_STATUS_ASSOC_NEED_SPECTRUM_MGMT & 0x1f ),         \
00165           "Association denied; Spectrum Management required" )
00166 
00167 #define ECONNREFUSED_ASSOC_BAD_POWER __einfo_error                      \
00168         ( EINFO_ECONNREFUSED_ASSOC_BAD_POWER )
00169 #define EINFO_ECONNREFUSED_ASSOC_BAD_POWER __einfo_uniqify              \
00170         ( EINFO_ECONNREFUSED,                                           \
00171           ( IEEE80211_STATUS_ASSOC_BAD_POWER & 0x1f ),                  \
00172           "Association denied; Power Capability unacceptable" )
00173 
00174 #define ECONNREFUSED_ASSOC_BAD_CHANNELS __einfo_error                   \
00175         ( EINFO_ECONNREFUSED_ASSOC_BAD_CHANNELS )
00176 #define EINFO_ECONNREFUSED_ASSOC_BAD_CHANNELS __einfo_uniqify           \
00177         ( EINFO_ECONNREFUSED,                                           \
00178           ( IEEE80211_STATUS_ASSOC_BAD_CHANNELS & 0x1f ),               \
00179           "Association denied; Supported Channels unacceptable" )
00180 
00181 #define ECONNREFUSED_ASSOC_NEED_SHORT_SLOT __einfo_error                \
00182         ( EINFO_ECONNREFUSED_ASSOC_NEED_SHORT_SLOT )
00183 #define EINFO_ECONNREFUSED_ASSOC_NEED_SHORT_SLOT __einfo_uniqify        \
00184         ( EINFO_ECONNREFUSED,                                           \
00185           ( IEEE80211_STATUS_ASSOC_NEED_SHORT_SLOT & 0x1f ),            \
00186           "Association denied; Short Slot Tume support req'd" )
00187 
00188 #define ECONNREFUSED_ASSOC_NEED_DSSS_OFDM __einfo_error                 \
00189         ( EINFO_ECONNREFUSED_ASSOC_NEED_DSSS_OFDM )
00190 #define EINFO_ECONNREFUSED_ASSOC_NEED_DSSS_OFDM __einfo_uniqify         \
00191         ( EINFO_ECONNREFUSED,                                           \
00192           ( IEEE80211_STATUS_ASSOC_NEED_DSSS_OFDM & 0x1f ),             \
00193           "Association denied; DSSS-OFDM support required" )
00194 
00195 #define EHOSTUNREACH_QOS_FAILURE __einfo_error                          \
00196         ( EINFO_EHOSTUNREACH_QOS_FAILURE )
00197 #define EINFO_EHOSTUNREACH_QOS_FAILURE __einfo_uniqify                  \
00198         ( EINFO_EHOSTUNREACH,                                           \
00199           ( IEEE80211_STATUS_QOS_FAILURE & 0x1f ),                      \
00200           "Unspecified, QoS-related failure" )
00201 
00202 #define EHOSTUNREACH_QOS_NO_ROOM __einfo_error                          \
00203         ( EINFO_EHOSTUNREACH_QOS_NO_ROOM )
00204 #define EINFO_EHOSTUNREACH_QOS_NO_ROOM __einfo_uniqify                  \
00205         ( EINFO_EHOSTUNREACH,                                           \
00206           ( IEEE80211_STATUS_QOS_NO_ROOM & 0x1f ),                      \
00207           "Association denied; QoS AP out of QoS resources" )
00208 
00209 #define EHOSTUNREACH_LINK_IS_HORRIBLE __einfo_error                     \
00210         ( EINFO_EHOSTUNREACH_LINK_IS_HORRIBLE )
00211 #define EINFO_EHOSTUNREACH_LINK_IS_HORRIBLE __einfo_uniqify             \
00212         ( EINFO_EHOSTUNREACH,                                           \
00213           ( IEEE80211_STATUS_LINK_IS_HORRIBLE & 0x1f ),                 \
00214           "Association denied due to excessively poor link" )
00215 
00216 #define EHOSTUNREACH_ASSOC_NEED_QOS __einfo_error                       \
00217         ( EINFO_EHOSTUNREACH_ASSOC_NEED_QOS )
00218 #define EINFO_EHOSTUNREACH_ASSOC_NEED_QOS __einfo_uniqify               \
00219         ( EINFO_EHOSTUNREACH,                                           \
00220           ( IEEE80211_STATUS_ASSOC_NEED_QOS & 0x1f ),                   \
00221           "Association denied; QoS support required" )
00222 
00223 #define EHOSTUNREACH_REQUEST_DECLINED __einfo_error                     \
00224         ( EINFO_EHOSTUNREACH_REQUEST_DECLINED )
00225 #define EINFO_EHOSTUNREACH_REQUEST_DECLINED __einfo_uniqify             \
00226         ( EINFO_EHOSTUNREACH,                                           \
00227           ( IEEE80211_STATUS_REQUEST_DECLINED & 0x1f ),                 \
00228           "The request has been declined" )
00229 
00230 #define EHOSTUNREACH_REQUEST_INVALID __einfo_error                      \
00231         ( EINFO_EHOSTUNREACH_REQUEST_INVALID )
00232 #define EINFO_EHOSTUNREACH_REQUEST_INVALID __einfo_uniqify              \
00233         ( EINFO_EHOSTUNREACH,                                           \
00234           ( IEEE80211_STATUS_REQUEST_INVALID & 0x1f ),                  \
00235           "Request unsuccessful due to invalid parameters" )
00236 
00237 #define EHOSTUNREACH_TS_NOT_CREATED_AGAIN __einfo_error                 \
00238         ( EINFO_EHOSTUNREACH_TS_NOT_CREATED_AGAIN )
00239 #define EINFO_EHOSTUNREACH_TS_NOT_CREATED_AGAIN __einfo_uniqify         \
00240         ( EINFO_EHOSTUNREACH,                                           \
00241           ( IEEE80211_STATUS_TS_NOT_CREATED_AGAIN & 0x1f ),             \
00242           "TS not created due to bad specification" )
00243 
00244 #define EHOSTUNREACH_INVALID_IE __einfo_error                           \
00245         ( EINFO_EHOSTUNREACH_INVALID_IE )
00246 #define EINFO_EHOSTUNREACH_INVALID_IE __einfo_uniqify                   \
00247         ( EINFO_EHOSTUNREACH,                                           \
00248           ( IEEE80211_STATUS_INVALID_IE & 0x1f ),                       \
00249           "Invalid information element" )
00250 
00251 #define EHOSTUNREACH_GROUP_CIPHER_INVALID __einfo_error                 \
00252         ( EINFO_EHOSTUNREACH_GROUP_CIPHER_INVALID )
00253 #define EINFO_EHOSTUNREACH_GROUP_CIPHER_INVALID __einfo_uniqify         \
00254         ( EINFO_EHOSTUNREACH,                                           \
00255           ( IEEE80211_STATUS_GROUP_CIPHER_INVALID & 0x1f ),             \
00256           "Invalid group cipher" )
00257 
00258 #define EHOSTUNREACH_PAIR_CIPHER_INVALID __einfo_error                  \
00259         ( EINFO_EHOSTUNREACH_PAIR_CIPHER_INVALID )
00260 #define EINFO_EHOSTUNREACH_PAIR_CIPHER_INVALID __einfo_uniqify          \
00261         ( EINFO_EHOSTUNREACH,                                           \
00262           ( IEEE80211_STATUS_PAIR_CIPHER_INVALID & 0x1f ),              \
00263           "Invalid pairwise cipher" )
00264 
00265 #define EHOSTUNREACH_AKMP_INVALID __einfo_error                         \
00266         ( EINFO_EHOSTUNREACH_AKMP_INVALID )
00267 #define EINFO_EHOSTUNREACH_AKMP_INVALID __einfo_uniqify                 \
00268         ( EINFO_EHOSTUNREACH,                                           \
00269           ( IEEE80211_STATUS_AKMP_INVALID & 0x1f ),                     \
00270           "Invalid AKMP" )
00271 
00272 #define EHOSTUNREACH_RSN_VERSION_UNSUPP __einfo_error                   \
00273         ( EINFO_EHOSTUNREACH_RSN_VERSION_UNSUPP )
00274 #define EINFO_EHOSTUNREACH_RSN_VERSION_UNSUPP __einfo_uniqify           \
00275         ( EINFO_EHOSTUNREACH,                                           \
00276           ( IEEE80211_STATUS_RSN_VERSION_UNSUPP & 0x1f ),               \
00277           "Unsupported RSN information element version" )
00278 
00279 #define EHOSTUNREACH_RSN_CAPAB_INVALID __einfo_error                    \
00280         ( EINFO_EHOSTUNREACH_RSN_CAPAB_INVALID )
00281 #define EINFO_EHOSTUNREACH_RSN_CAPAB_INVALID __einfo_uniqify            \
00282         ( EINFO_EHOSTUNREACH,                                           \
00283           ( IEEE80211_STATUS_RSN_CAPAB_INVALID & 0x1f ),                \
00284           "Invalid RSN information element capabilities" )
00285 
00286 #define EHOSTUNREACH_CIPHER_REJECTED __einfo_error                      \
00287         ( EINFO_EHOSTUNREACH_CIPHER_REJECTED )
00288 #define EINFO_EHOSTUNREACH_CIPHER_REJECTED __einfo_uniqify              \
00289         ( EINFO_EHOSTUNREACH,                                           \
00290           ( IEEE80211_STATUS_CIPHER_REJECTED & 0x1f ),                  \
00291           "Cipher suite rejected because of security policy" )
00292 
00293 #define EHOSTUNREACH_TS_NOT_CREATED_WAIT __einfo_error                  \
00294         ( EINFO_EHOSTUNREACH_TS_NOT_CREATED_WAIT )
00295 #define EINFO_EHOSTUNREACH_TS_NOT_CREATED_WAIT __einfo_uniqify          \
00296         ( EINFO_EHOSTUNREACH,                                           \
00297           ( IEEE80211_STATUS_TS_NOT_CREATED_WAIT & 0x1f ),              \
00298           "TS not created due to insufficient delay" )
00299 
00300 #define EHOSTUNREACH_DIRECT_LINK_FORBIDDEN __einfo_error                \
00301         ( EINFO_EHOSTUNREACH_DIRECT_LINK_FORBIDDEN )
00302 #define EINFO_EHOSTUNREACH_DIRECT_LINK_FORBIDDEN __einfo_uniqify        \
00303         ( EINFO_EHOSTUNREACH,                                           \
00304           ( IEEE80211_STATUS_DIRECT_LINK_FORBIDDEN & 0x1f ),            \
00305           "Direct link is not allowed in the BSS by policy" )
00306 
00307 #define EHOSTUNREACH_DEST_NOT_PRESENT __einfo_error                     \
00308         ( EINFO_EHOSTUNREACH_DEST_NOT_PRESENT )
00309 #define EINFO_EHOSTUNREACH_DEST_NOT_PRESENT __einfo_uniqify             \
00310         ( EINFO_EHOSTUNREACH,                                           \
00311           ( IEEE80211_STATUS_DEST_NOT_PRESENT & 0x1f ),                 \
00312           "The Destination STA is not present within the BSS" )
00313 
00314 #define EHOSTUNREACH_DEST_NOT_QOS __einfo_error                         \
00315         ( EINFO_EHOSTUNREACH_DEST_NOT_QOS )
00316 #define EINFO_EHOSTUNREACH_DEST_NOT_QOS __einfo_uniqify                 \
00317         ( EINFO_EHOSTUNREACH,                                           \
00318           ( IEEE80211_STATUS_DEST_NOT_QOS & 0x1f ),                     \
00319           "The Destination STA is not a QoS STA" )
00320 
00321 #define EHOSTUNREACH_ASSOC_LISTEN_TOO_HIGH __einfo_error                \
00322         ( EINFO_EHOSTUNREACH_ASSOC_LISTEN_TOO_HIGH )
00323 #define EINFO_EHOSTUNREACH_ASSOC_LISTEN_TOO_HIGH __einfo_uniqify        \
00324         ( EINFO_EHOSTUNREACH,                                           \
00325           ( IEEE80211_STATUS_ASSOC_LISTEN_TOO_HIGH & 0x1f ),            \
00326           "Association denied; Listen Interval is too large" )
00327 
00328 /* 802.11 reason codes (IEEE Std 802.11-2007, Table 7-22) */
00329 
00330 #define ECONNRESET_UNSPECIFIED __einfo_error                            \
00331         ( EINFO_ECONNRESET_UNSPECIFIED )
00332 #define EINFO_ECONNRESET_UNSPECIFIED __einfo_uniqify                    \
00333         ( EINFO_ECONNRESET,                                             \
00334           ( IEEE80211_REASON_UNSPECIFIED & 0x1f ),                      \
00335           "Unspecified reason" )
00336 
00337 #define ECONNRESET_AUTH_NO_LONGER_VALID __einfo_error                   \
00338         ( EINFO_ECONNRESET_AUTH_NO_LONGER_VALID )
00339 #define EINFO_ECONNRESET_AUTH_NO_LONGER_VALID __einfo_uniqify           \
00340         ( EINFO_ECONNRESET,                                             \
00341           ( IEEE80211_REASON_AUTH_NO_LONGER_VALID & 0x1f ),             \
00342           "Previous authentication no longer valid" )
00343 
00344 #define ECONNRESET_LEAVING __einfo_error                                \
00345         ( EINFO_ECONNRESET_LEAVING )
00346 #define EINFO_ECONNRESET_LEAVING __einfo_uniqify                        \
00347         ( EINFO_ECONNRESET,                                             \
00348           ( IEEE80211_REASON_LEAVING & 0x1f ),                          \
00349           "Deauthenticated due to leaving network" )
00350 
00351 #define ECONNRESET_INACTIVITY __einfo_error                             \
00352         ( EINFO_ECONNRESET_INACTIVITY )
00353 #define EINFO_ECONNRESET_INACTIVITY __einfo_uniqify                     \
00354         ( EINFO_ECONNRESET,                                             \
00355           ( IEEE80211_REASON_INACTIVITY & 0x1f ),                       \
00356           "Disassociated due to inactivity" )
00357 
00358 #define ECONNRESET_OUT_OF_RESOURCES __einfo_error                       \
00359         ( EINFO_ECONNRESET_OUT_OF_RESOURCES )
00360 #define EINFO_ECONNRESET_OUT_OF_RESOURCES __einfo_uniqify               \
00361         ( EINFO_ECONNRESET,                                             \
00362           ( IEEE80211_REASON_OUT_OF_RESOURCES & 0x1f ),                 \
00363           "Disassociated because AP is out of resources" )
00364 
00365 #define ECONNRESET_NEED_AUTH __einfo_error                              \
00366         ( EINFO_ECONNRESET_NEED_AUTH )
00367 #define EINFO_ECONNRESET_NEED_AUTH __einfo_uniqify                      \
00368         ( EINFO_ECONNRESET,                                             \
00369           ( IEEE80211_REASON_NEED_AUTH & 0x1f ),                        \
00370           "Class 2 frame received from nonauthenticated STA" )
00371 
00372 #define ECONNRESET_NEED_ASSOC __einfo_error                             \
00373         ( EINFO_ECONNRESET_NEED_ASSOC )
00374 #define EINFO_ECONNRESET_NEED_ASSOC __einfo_uniqify                     \
00375         ( EINFO_ECONNRESET,                                             \
00376           ( IEEE80211_REASON_NEED_ASSOC & 0x1f ),                       \
00377           "Class 3 frame received from nonassociated STA" )
00378 
00379 #define ECONNRESET_LEAVING_TO_ROAM __einfo_error                        \
00380         ( EINFO_ECONNRESET_LEAVING_TO_ROAM )
00381 #define EINFO_ECONNRESET_LEAVING_TO_ROAM __einfo_uniqify                \
00382         ( EINFO_ECONNRESET,                                             \
00383           ( IEEE80211_REASON_LEAVING_TO_ROAM & 0x1f ),                  \
00384           "Disassociated due to roaming" )
00385 
00386 #define ECONNRESET_REASSOC_INVALID __einfo_error                        \
00387         ( EINFO_ECONNRESET_REASSOC_INVALID )
00388 #define EINFO_ECONNRESET_REASSOC_INVALID __einfo_uniqify                \
00389         ( EINFO_ECONNRESET,                                             \
00390           ( IEEE80211_REASON_REASSOC_INVALID & 0x1f ),                  \
00391           "STA requesting (re)association not authenticated" )
00392 
00393 #define ECONNRESET_BAD_POWER __einfo_error                              \
00394         ( EINFO_ECONNRESET_BAD_POWER )
00395 #define EINFO_ECONNRESET_BAD_POWER __einfo_uniqify                      \
00396         ( EINFO_ECONNRESET,                                             \
00397           ( IEEE80211_REASON_BAD_POWER & 0x1f ),                        \
00398           "Disassociated; Power Capability unacceptable" )
00399 
00400 #define ECONNRESET_BAD_CHANNELS __einfo_error                           \
00401         ( EINFO_ECONNRESET_BAD_CHANNELS )
00402 #define EINFO_ECONNRESET_BAD_CHANNELS __einfo_uniqify                   \
00403         ( EINFO_ECONNRESET,                                             \
00404           ( IEEE80211_REASON_BAD_CHANNELS & 0x1f ),                     \
00405           "Disassociated; Supported Channels unacceptable" )
00406 
00407 #define ECONNRESET_INVALID_IE __einfo_error                             \
00408         ( EINFO_ECONNRESET_INVALID_IE )
00409 #define EINFO_ECONNRESET_INVALID_IE __einfo_uniqify                     \
00410         ( EINFO_ECONNRESET,                                             \
00411           ( IEEE80211_REASON_INVALID_IE & 0x1f ),                       \
00412           "Invalid information element" )
00413 
00414 #define ECONNRESET_MIC_FAILURE __einfo_error                            \
00415         ( EINFO_ECONNRESET_MIC_FAILURE )
00416 #define EINFO_ECONNRESET_MIC_FAILURE __einfo_uniqify                    \
00417         ( EINFO_ECONNRESET,                                             \
00418           ( IEEE80211_REASON_MIC_FAILURE & 0x1f ),                      \
00419           "Message integrity code (MIC) failure" )
00420 
00421 #define ECONNRESET_4WAY_TIMEOUT __einfo_error                           \
00422         ( EINFO_ECONNRESET_4WAY_TIMEOUT )
00423 #define EINFO_ECONNRESET_4WAY_TIMEOUT __einfo_uniqify                   \
00424         ( EINFO_ECONNRESET,                                             \
00425           ( IEEE80211_REASON_4WAY_TIMEOUT & 0x1f ),                     \
00426           "4-Way Handshake timeout" )
00427 
00428 #define ECONNRESET_GROUPKEY_TIMEOUT __einfo_error                       \
00429         ( EINFO_ECONNRESET_GROUPKEY_TIMEOUT )
00430 #define EINFO_ECONNRESET_GROUPKEY_TIMEOUT __einfo_uniqify               \
00431         ( EINFO_ECONNRESET,                                             \
00432           ( IEEE80211_REASON_GROUPKEY_TIMEOUT & 0x1f ),                 \
00433           "Group Key Handshake timeout" )
00434 
00435 #define ECONNRESET_4WAY_INVALID __einfo_error                           \
00436         ( EINFO_ECONNRESET_4WAY_INVALID )
00437 #define EINFO_ECONNRESET_4WAY_INVALID __einfo_uniqify                   \
00438         ( EINFO_ECONNRESET,                                             \
00439           ( IEEE80211_REASON_4WAY_INVALID & 0x1f ),                     \
00440           "4-Way Handshake information element changed unduly" )
00441 
00442 #define ECONNRESET_GROUP_CIPHER_INVALID __einfo_error                   \
00443         ( EINFO_ECONNRESET_GROUP_CIPHER_INVALID )
00444 #define EINFO_ECONNRESET_GROUP_CIPHER_INVALID __einfo_uniqify           \
00445         ( EINFO_ECONNRESET,                                             \
00446           ( IEEE80211_REASON_GROUP_CIPHER_INVALID & 0x1f ),             \
00447           "Invalid group cipher" )
00448 
00449 #define ECONNRESET_PAIR_CIPHER_INVALID __einfo_error                    \
00450         ( EINFO_ECONNRESET_PAIR_CIPHER_INVALID )
00451 #define EINFO_ECONNRESET_PAIR_CIPHER_INVALID __einfo_uniqify            \
00452         ( EINFO_ECONNRESET,                                             \
00453           ( IEEE80211_REASON_PAIR_CIPHER_INVALID & 0x1f ),              \
00454           "Invalid pairwise cipher" )
00455 
00456 #define ECONNRESET_AKMP_INVALID __einfo_error                           \
00457         ( EINFO_ECONNRESET_AKMP_INVALID )
00458 #define EINFO_ECONNRESET_AKMP_INVALID __einfo_uniqify                   \
00459         ( EINFO_ECONNRESET,                                             \
00460           ( IEEE80211_REASON_AKMP_INVALID & 0x1f ),                     \
00461           "Invalid AKMP" )
00462 
00463 #define ECONNRESET_RSN_VERSION_INVALID __einfo_error                    \
00464         ( EINFO_ECONNRESET_RSN_VERSION_INVALID )
00465 #define EINFO_ECONNRESET_RSN_VERSION_INVALID __einfo_uniqify            \
00466         ( EINFO_ECONNRESET,                                             \
00467           ( IEEE80211_REASON_RSN_VERSION_INVALID & 0x1f ),              \
00468           "Unsupported RSN information element version" )
00469 
00470 #define ECONNRESET_RSN_CAPAB_INVALID __einfo_error                      \
00471         ( EINFO_ECONNRESET_RSN_CAPAB_INVALID )
00472 #define EINFO_ECONNRESET_RSN_CAPAB_INVALID __einfo_uniqify              \
00473         ( EINFO_ECONNRESET,                                             \
00474           ( IEEE80211_REASON_RSN_CAPAB_INVALID & 0x1f ),                \
00475           "Invalid RSN information element capabilities" )
00476 
00477 #define ECONNRESET_8021X_FAILURE __einfo_error                          \
00478         ( EINFO_ECONNRESET_8021X_FAILURE )
00479 #define EINFO_ECONNRESET_8021X_FAILURE __einfo_uniqify                  \
00480         ( EINFO_ECONNRESET,                                             \
00481           ( IEEE80211_REASON_8021X_FAILURE & 0x1f ),                    \
00482           "IEEE 802.1X authentication failed" )
00483 
00484 #define ECONNRESET_CIPHER_REJECTED __einfo_error                        \
00485         ( EINFO_ECONNRESET_CIPHER_REJECTED )
00486 #define EINFO_ECONNRESET_CIPHER_REJECTED __einfo_uniqify                \
00487         ( EINFO_ECONNRESET,                                             \
00488           ( IEEE80211_REASON_CIPHER_REJECTED & 0x1f ),                  \
00489           "Cipher suite rejected because of security policy" )
00490 
00491 #define ENETRESET_QOS_UNSPECIFIED __einfo_error                         \
00492         ( EINFO_ENETRESET_QOS_UNSPECIFIED )
00493 #define EINFO_ENETRESET_QOS_UNSPECIFIED __einfo_uniqify                 \
00494         ( EINFO_ENETRESET,                                              \
00495           ( IEEE80211_REASON_QOS_UNSPECIFIED & 0x1f ),                  \
00496           "Disassociated for unspecified, QoS-related reason" )
00497 
00498 #define ENETRESET_QOS_OUT_OF_RESOURCES __einfo_error                    \
00499         ( EINFO_ENETRESET_QOS_OUT_OF_RESOURCES )
00500 #define EINFO_ENETRESET_QOS_OUT_OF_RESOURCES __einfo_uniqify            \
00501         ( EINFO_ENETRESET,                                              \
00502           ( IEEE80211_REASON_QOS_OUT_OF_RESOURCES & 0x1f ),             \
00503           "Disassociated; QoS AP is out of QoS resources" )
00504 
00505 #define ENETRESET_LINK_IS_HORRIBLE __einfo_error                        \
00506         ( EINFO_ENETRESET_LINK_IS_HORRIBLE )
00507 #define EINFO_ENETRESET_LINK_IS_HORRIBLE __einfo_uniqify                \
00508         ( EINFO_ENETRESET,                                              \
00509           ( IEEE80211_REASON_LINK_IS_HORRIBLE & 0x1f ),                 \
00510           "Disassociated due to excessively poor link" )
00511 
00512 #define ENETRESET_INVALID_TXOP __einfo_error                            \
00513         ( EINFO_ENETRESET_INVALID_TXOP )
00514 #define EINFO_ENETRESET_INVALID_TXOP __einfo_uniqify                    \
00515         ( EINFO_ENETRESET,                                              \
00516           ( IEEE80211_REASON_INVALID_TXOP & 0x1f ),                     \
00517           "Disassociated due to TXOP limit violation" )
00518 
00519 #define ENETRESET_REQUESTED_LEAVING __einfo_error                       \
00520         ( EINFO_ENETRESET_REQUESTED_LEAVING )
00521 #define EINFO_ENETRESET_REQUESTED_LEAVING __einfo_uniqify               \
00522         ( EINFO_ENETRESET,                                              \
00523           ( IEEE80211_REASON_REQUESTED_LEAVING & 0x1f ),                \
00524           "Requested; STA is leaving the BSS (or resetting)" )
00525 
00526 #define ENETRESET_REQUESTED_NO_USE __einfo_error                        \
00527         ( EINFO_ENETRESET_REQUESTED_NO_USE )
00528 #define EINFO_ENETRESET_REQUESTED_NO_USE __einfo_uniqify                \
00529         ( EINFO_ENETRESET,                                              \
00530           ( IEEE80211_REASON_REQUESTED_NO_USE & 0x1f ),                 \
00531           "Requested; does not want to use the mechanism" )
00532 
00533 #define ENETRESET_REQUESTED_NEED_SETUP __einfo_error                    \
00534         ( EINFO_ENETRESET_REQUESTED_NEED_SETUP )
00535 #define EINFO_ENETRESET_REQUESTED_NEED_SETUP __einfo_uniqify            \
00536         ( EINFO_ENETRESET,                                              \
00537           ( IEEE80211_REASON_REQUESTED_NEED_SETUP & 0x1f ),             \
00538           "Requested; setup is required" )
00539 
00540 #define ENETRESET_REQUESTED_TIMEOUT __einfo_error                       \
00541         ( EINFO_ENETRESET_REQUESTED_TIMEOUT )
00542 #define EINFO_ENETRESET_REQUESTED_TIMEOUT __einfo_uniqify               \
00543         ( EINFO_ENETRESET,                                              \
00544           ( IEEE80211_REASON_REQUESTED_TIMEOUT & 0x1f ),                \
00545           "Requested from peer STA due to timeout" )
00546 
00547 #define ENETRESET_CIPHER_UNSUPPORTED __einfo_error                      \
00548         ( EINFO_ENETRESET_CIPHER_UNSUPPORTED )
00549 #define EINFO_ENETRESET_CIPHER_UNSUPPORTED __einfo_uniqify              \
00550         ( EINFO_ENETRESET,                                              \
00551           ( IEEE80211_REASON_CIPHER_UNSUPPORTED & 0x1f ),               \
00552           "Peer STA does not support requested cipher suite" )
00553 
00554 /** Make return status code from 802.11 status code */
00555 #define E80211_STATUS( stat )                                           \
00556         ( ( (stat) & 0x20 ) ?                                           \
00557           EUNIQ ( EINFO_EHOSTUNREACH, ( (stat) & 0x1f ),                \
00558                   EHOSTUNREACH_QOS_FAILURE,                             \
00559                   EHOSTUNREACH_QOS_NO_ROOM,                             \
00560                   EHOSTUNREACH_LINK_IS_HORRIBLE,                        \
00561                   EHOSTUNREACH_ASSOC_NEED_QOS,                          \
00562                   EHOSTUNREACH_REQUEST_DECLINED,                        \
00563                   EHOSTUNREACH_REQUEST_INVALID,                         \
00564                   EHOSTUNREACH_TS_NOT_CREATED_AGAIN,                    \
00565                   EHOSTUNREACH_INVALID_IE,                              \
00566                   EHOSTUNREACH_GROUP_CIPHER_INVALID,                    \
00567                   EHOSTUNREACH_PAIR_CIPHER_INVALID,                     \
00568                   EHOSTUNREACH_AKMP_INVALID,                            \
00569                   EHOSTUNREACH_RSN_VERSION_UNSUPP,                      \
00570                   EHOSTUNREACH_RSN_CAPAB_INVALID,                       \
00571                   EHOSTUNREACH_CIPHER_REJECTED,                         \
00572                   EHOSTUNREACH_TS_NOT_CREATED_WAIT,                     \
00573                   EHOSTUNREACH_DIRECT_LINK_FORBIDDEN,                   \
00574                   EHOSTUNREACH_DEST_NOT_PRESENT,                        \
00575                   EHOSTUNREACH_DEST_NOT_QOS,                            \
00576                   EHOSTUNREACH_ASSOC_LISTEN_TOO_HIGH ) :                \
00577           EUNIQ ( EINFO_ECONNREFUSED, ( (stat) & 0x1f ),                \
00578                   ECONNREFUSED_FAILURE,                                 \
00579                   ECONNREFUSED_CAPAB_UNSUPP,                            \
00580                   ECONNREFUSED_REASSOC_INVALID,                         \
00581                   ECONNREFUSED_ASSOC_DENIED,                            \
00582                   ECONNREFUSED_AUTH_ALGO_UNSUPP,                        \
00583                   ECONNREFUSED_AUTH_SEQ_INVALID,                        \
00584                   ECONNREFUSED_AUTH_CHALL_INVALID,                      \
00585                   ECONNREFUSED_AUTH_TIMEOUT,                            \
00586                   ECONNREFUSED_ASSOC_NO_ROOM,                           \
00587                   ECONNREFUSED_ASSOC_NEED_RATE,                         \
00588                   ECONNREFUSED_ASSOC_NEED_SHORT_PMBL,                   \
00589                   ECONNREFUSED_ASSOC_NEED_PBCC,                         \
00590                   ECONNREFUSED_ASSOC_NEED_CHAN_AGILITY,                 \
00591                   ECONNREFUSED_ASSOC_NEED_SPECTRUM_MGMT,                \
00592                   ECONNREFUSED_ASSOC_BAD_POWER,                         \
00593                   ECONNREFUSED_ASSOC_BAD_CHANNELS,                      \
00594                   ECONNREFUSED_ASSOC_NEED_SHORT_SLOT,                   \
00595                   ECONNREFUSED_ASSOC_NEED_DSSS_OFDM ) )
00596 
00597 /** Make return status code from 802.11 reason code */
00598 #define E80211_REASON( reas )                                           \
00599         ( ( (reas) & 0x20 ) ?                                           \
00600           EUNIQ ( EINFO_ENETRESET, ( (reas) & 0x1f ),                   \
00601                   ENETRESET_QOS_UNSPECIFIED,                            \
00602                   ENETRESET_QOS_OUT_OF_RESOURCES,                       \
00603                   ENETRESET_LINK_IS_HORRIBLE,                           \
00604                   ENETRESET_INVALID_TXOP,                               \
00605                   ENETRESET_REQUESTED_LEAVING,                          \
00606                   ENETRESET_REQUESTED_NO_USE,                           \
00607                   ENETRESET_REQUESTED_NEED_SETUP,                       \
00608                   ENETRESET_REQUESTED_TIMEOUT,                          \
00609                   ENETRESET_CIPHER_UNSUPPORTED ) :                      \
00610           EUNIQ ( EINFO_ECONNRESET, ( (reas) & 0x1f ),                  \
00611                   ECONNRESET_UNSPECIFIED,                               \
00612                   ECONNRESET_AUTH_NO_LONGER_VALID,                      \
00613                   ECONNRESET_LEAVING,                                   \
00614                   ECONNRESET_INACTIVITY,                                \
00615                   ECONNRESET_OUT_OF_RESOURCES,                          \
00616                   ECONNRESET_NEED_AUTH,                                 \
00617                   ECONNRESET_NEED_ASSOC,                                \
00618                   ECONNRESET_LEAVING_TO_ROAM,                           \
00619                   ECONNRESET_REASSOC_INVALID,                           \
00620                   ECONNRESET_BAD_POWER,                                 \
00621                   ECONNRESET_BAD_CHANNELS,                              \
00622                   ECONNRESET_INVALID_IE,                                \
00623                   ECONNRESET_MIC_FAILURE,                               \
00624                   ECONNRESET_4WAY_TIMEOUT,                              \
00625                   ECONNRESET_GROUPKEY_TIMEOUT,                          \
00626                   ECONNRESET_4WAY_INVALID,                              \
00627                   ECONNRESET_GROUP_CIPHER_INVALID,                      \
00628                   ECONNRESET_PAIR_CIPHER_INVALID,                       \
00629                   ECONNRESET_AKMP_INVALID,                              \
00630                   ECONNRESET_RSN_VERSION_INVALID,                       \
00631                   ECONNRESET_RSN_CAPAB_INVALID,                         \
00632                   ECONNRESET_8021X_FAILURE,                             \
00633                   ECONNRESET_CIPHER_REJECTED ) )
00634 
00635 #endif /* _IPXE_NET80211_ERR_H */