• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdint.h>
2 #include "iw.h"
3 
4 static const char *status_table[] = {
5 	[0] = "Successful",
6 	[1] = "Unspecified failure",
7 	[10] = "Cannot support all requested capabilities in the capability information field",
8 	[11] = "Reassociation denied due to inability to confirm that association exists",
9 	[12] = "Association denied due to reason outside the scope of this standard",
10 	[13] = "Responding station does not support the specified authentication algorithm",
11 	[14] = "Received an authentication frame with authentication transaction sequence number out of expected sequence",
12 	[15] = "Authentication rejected because of challenge failure",
13 	[16] = "Authentication rejected due to timeout waiting for next frame in sequence",
14 	[17] = "Association denied because AP is unable to handle additional associated STA",
15 	[18] = "Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter",
16 	[19] = "Association denied due to requesting station not supporting the short preamble option",
17 	[20] = "Association denied due to requesting station not supporting the PBCC modulation option",
18 	[21] = "Association denied due to requesting station not supporting the channel agility option",
19 	[22] = "Association request rejected because Spectrum Management capability is required",
20 	[23] = "Association request rejected because the information in the Power Capability element is unacceptable",
21 	[24] = "Association request rejected because the information in the Supported Channels element is unacceptable",
22 	[25] = "Association request rejected due to requesting station not supporting the short slot time option",
23 	[26] = "Association request rejected due to requesting station not supporting the ER-PBCC modulation option",
24 	[27] = "Association denied due to requesting STA not supporting HT features",
25 	[28] = "R0KH Unreachable",
26 	[29] = "Association denied because the requesting STA does not support the PCO transition required by the AP",
27 	[30] = "Association request rejected temporarily; try again later",
28 	[31] = "Robust Management frame policy violation",
29 	[32] = "Unspecified, QoS related failure",
30 	[33] = "Association denied due to QAP having insufficient bandwidth to handle another QSTA",
31 	[34] = "Association denied due to poor channel conditions",
32 	[35] = "Association (with QBSS) denied due to requesting station not supporting the QoS facility",
33 	[37] = "The request has been declined",
34 	[38] = "The request has not been successful as one or more parameters have invalid values",
35 	[39] = "The TS has not been created because the request cannot be honored. However, a suggested Tspec is provided so that the initiating QSTA may attempt to send another TS with the suggested changes to the TSpec",
36 	[40] = "Invalid Information Element",
37 	[41] = "Group Cipher is not valid",
38 	[42] = "Pairwise Cipher is not valid",
39 	[43] = "AKMP is not valid",
40 	[44] = "Unsupported RSN IE version",
41 	[45] = "Invalid RSN IE Capabilities",
42 	[46] = "Cipher suite is rejected per security policy",
43 	[47] = "The TS has not been created. However, the HC may be capable of creating a TS, in response to a request, after the time indicated in the TS Delay element",
44 	[48] = "Direct link is not allowed in the BSS by policy",
45 	[49] = "Destination STA is not present within this QBSS",
46 	[50] = "The destination STA is not a QSTA",
47 	[51] = "Association denied because Listen Interval is too large",
48 	[52] = "Invalid Fast BSS Transition Action Frame Count",
49 	[53] = "Invalid PMKID",
50 	[54] = "Invalid MDIE",
51 	[55] = "Invalid FTIE",
52 };
53 
get_status_str(uint16_t status)54 const char *get_status_str(uint16_t status)
55 {
56 	if (status < ARRAY_SIZE(status_table) && status_table[status])
57 		return status_table[status];
58 	return "<unknown>";
59 }
60