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