You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wireless_errors.c 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * Copyright (C) 2009 Joshua Oreman <oremanj@rwcr.net>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. FILE_LICENCE ( GPL2_OR_LATER );
  19. #include <errno.h>
  20. #include <gpxe/errortab.h>
  21. /* Record errors as though they come from the 802.11 stack */
  22. #undef ERRFILE
  23. #define ERRFILE ERRFILE_net80211
  24. /** All 802.11 errors
  25. *
  26. * These follow the 802.11 standard as much as is feasible, but most
  27. * have been abbreviated to fit the 50-character limit imposed by
  28. * strerror.
  29. */
  30. struct errortab wireless_errors[] __errortab = {
  31. /* gPXE 802.11 stack errors */
  32. { EINVAL | EUNIQ_01, "Packet too short" },
  33. { EINVAL | EUNIQ_02, "Packet 802.11 version not supported" },
  34. { EINVAL | EUNIQ_03, "Packet not a data packet" },
  35. { EINVAL | EUNIQ_04, "Packet not from an Access Point" },
  36. { EINVAL | EUNIQ_05, "Packet has invalid LLC header" },
  37. { EINVAL | EUNIQ_06, "Packet decryption error", },
  38. { EINVAL | EUNIQ_07, "Invalid active scan requested" },
  39. /* 802.11 status codes (IEEE Std 802.11-2007, Table 7-23) */
  40. /* Maximum error length: 50 chars | */
  41. { ECONNREFUSED | EUNIQ_01, "Unspecified failure" },
  42. { ECONNREFUSED | EUNIQ_0A, "Cannot support all requested capabilities" },
  43. { ECONNREFUSED | EUNIQ_0B, "Reassociation denied due to lack of association" },
  44. { ECONNREFUSED | EUNIQ_0C, "Association denied for another reason" },
  45. { ECONNREFUSED | EUNIQ_0D, "Authentication algorithm unsupported" },
  46. { ECONNREFUSED | EUNIQ_0E, "Authentication sequence number unexpected" },
  47. { ECONNREFUSED | EUNIQ_0F, "Authentication rejected due to challenge failure" },
  48. { ECONNREFUSED | EUNIQ_10, "Authentication rejected due to timeout" },
  49. { ECONNREFUSED | EUNIQ_11, "Association denied because AP is out of resources" },
  50. { ECONNREFUSED | EUNIQ_12, "Association denied; basic rate support required" },
  51. { ECONNREFUSED | EUNIQ_13, "Association denied; short preamble support req'd" },
  52. { ECONNREFUSED | EUNIQ_14, "Association denied; PBCC modulation support req'd" },
  53. { ECONNREFUSED | EUNIQ_15, "Association denied; Channel Agility support req'd" },
  54. { ECONNREFUSED | EUNIQ_16, "Association denied; Spectrum Management required" },
  55. { ECONNREFUSED | EUNIQ_17, "Association denied; Power Capability unacceptable" },
  56. { ECONNREFUSED | EUNIQ_18, "Association denied; Supported Channels unacceptable" },
  57. { ECONNREFUSED | EUNIQ_19, "Association denied; Short Slot Tume support req'd" },
  58. { ECONNREFUSED | EUNIQ_1A, "Association denied; DSSS-OFDM support required" },
  59. { EHOSTUNREACH, "Unspecified, QoS-related failure" },
  60. { EHOSTUNREACH | EUNIQ_01, "Association denied; QoS AP out of QoS resources" },
  61. { EHOSTUNREACH | EUNIQ_02, "Association denied due to excessively poor link" },
  62. { EHOSTUNREACH | EUNIQ_03, "Association denied; QoS support required" },
  63. { EHOSTUNREACH | EUNIQ_05, "The request has been declined" },
  64. { EHOSTUNREACH | EUNIQ_06, "Request unsuccessful due to invalid parameters" },
  65. { EHOSTUNREACH | EUNIQ_07, "TS not created due to bad specification" },
  66. { EHOSTUNREACH | EUNIQ_08, "Invalid information element" },
  67. { EHOSTUNREACH | EUNIQ_09, "Invalid group cipher" },
  68. { EHOSTUNREACH | EUNIQ_0A, "Invalid pairwise cipher" },
  69. { EHOSTUNREACH | EUNIQ_0B, "Invalid AKMP" },
  70. { EHOSTUNREACH | EUNIQ_0C, "Unsupported RSN information element version" },
  71. { EHOSTUNREACH | EUNIQ_0D, "Invalid RSN information element capabilities" },
  72. { EHOSTUNREACH | EUNIQ_0E, "Cipher suite rejected because of security policy" },
  73. { EHOSTUNREACH | EUNIQ_0F, "TS not created due to insufficient delay" },
  74. { EHOSTUNREACH | EUNIQ_10, "Direct link is not allowed in the BSS by policy" },
  75. { EHOSTUNREACH | EUNIQ_11, "The Destination STA is not present within the BSS" },
  76. { EHOSTUNREACH | EUNIQ_12, "The Destination STA is not a QoS STA" },
  77. { EHOSTUNREACH | EUNIQ_13, "Association denied; Listen Interval is too large" },
  78. /* 802.11 reason codes (IEEE Std 802.11-2007, Table 7-22) */
  79. /* Maximum error length: 50 chars | */
  80. { ECONNRESET | EUNIQ_01, "Unspecified reason" },
  81. { ECONNRESET | EUNIQ_02, "Previous authentication no longer valid" },
  82. { ECONNRESET | EUNIQ_03, "Deauthenticated due to leaving network" },
  83. { ECONNRESET | EUNIQ_04, "Disassociated due to inactivity" },
  84. { ECONNRESET | EUNIQ_05, "Disassociated because AP is out of resources" },
  85. { ECONNRESET | EUNIQ_06, "Class 2 frame received from nonauthenticated STA" },
  86. { ECONNRESET | EUNIQ_07, "Class 3 frame received from nonassociated STA" },
  87. { ECONNRESET | EUNIQ_08, "Disassociated due to roaming" },
  88. { ECONNRESET | EUNIQ_09, "STA requesting (re)association not authenticated" },
  89. { ECONNRESET | EUNIQ_0A, "Disassociated; Power Capability unacceptable" },
  90. { ECONNRESET | EUNIQ_0B, "Disassociated; Supported Channels unacceptable" },
  91. { ECONNRESET | EUNIQ_0D, "Invalid information element" },
  92. { ECONNRESET | EUNIQ_0E, "Message integrity code (MIC) failure" },
  93. { ECONNRESET | EUNIQ_0F, "4-Way Handshake timeout" },
  94. { ECONNRESET | EUNIQ_10, "Group Key Handshake timeout" },
  95. { ECONNRESET | EUNIQ_11, "4-Way Handshake information element changed unduly" },
  96. { ECONNRESET | EUNIQ_12, "Invalid group cipher" },
  97. { ECONNRESET | EUNIQ_13, "Invalid pairwise cipher" },
  98. { ECONNRESET | EUNIQ_14, "Invalid AKMP" },
  99. { ECONNRESET | EUNIQ_15, "Unsupported RSN information element version" },
  100. { ECONNRESET | EUNIQ_16, "Invalid RSN information element capabilities" },
  101. { ECONNRESET | EUNIQ_17, "IEEE 802.1X authentication failed" },
  102. { ECONNRESET | EUNIQ_18, "Cipher suite rejected because of security policy" },
  103. { ENETRESET, "Disassociated for unspecified, QoS-related reason" },
  104. { ENETRESET | EUNIQ_01, "Disassociated; QoS AP is out of QoS resources" },
  105. { ENETRESET | EUNIQ_02, "Disassociated due to excessively poor link" },
  106. { ENETRESET | EUNIQ_03, "Disassociated due to TXOP limit violation" },
  107. { ENETRESET | EUNIQ_04, "Requested; STA is leaving the BSS (or resetting)" },
  108. { ENETRESET | EUNIQ_05, "Requested; does not want to use the mechanism" },
  109. { ENETRESET | EUNIQ_06, "Requested; setup is required" },
  110. { ENETRESET | EUNIQ_07, "Requested from peer STA due to timeout" },
  111. { ENETRESET | EUNIQ_0D, "Peer STA does not support requested cipher suite" },
  112. };