xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/include/bcmerror.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Common header file for all error codes.
3  *
4  * Copyright (C) 2020, Broadcom.
5  *
6  *      Unless you and Broadcom execute a separate written software license
7  * agreement governing use of this software, this software is licensed to you
8  * under the terms of the GNU General Public License version 2 (the "GPL"),
9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10  * following added to such license:
11  *
12  *      As a special exception, the copyright holders of this software give you
13  * permission to link this software with independent modules, and to copy and
14  * distribute the resulting executable under terms of your choice, provided that
15  * you also meet, for each linked independent module, the terms and conditions of
16  * the license of that module.  An independent module is a module which is not
17  * derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *
21  * <<Broadcom-WL-IPTag/Dual:>>
22  *
23  *
24  *
25  */
26 
27 #ifndef	_bcmerror_h_
28 #define	_bcmerror_h_
29 
30 #include <typedefs.h>
31 
32 /* Use error codes from this file only if BCMUTILS_ERR_CODES is defined. */
33 #ifdef BCMUTILS_ERR_CODES
34 
35 /* NOTE re: Module specific error codes.
36  *
37  * BCME_.. error codes are extended by various features - e.g. FTM, NAN, SAE etc.
38  * The current process is to allocate a range of 1024 negative 32 bit integers to
39  * each module that extends the error codes to indicate a module specific status.
40  *
41  * The next range to use is below. If that range is used for a new feature, please
42  * update the range to be used by the next feature.
43  *
44  * Next available (inclusive) range: [-8*1024 + 1, -7*1024]
45  *
46  * Common error codes use BCME_ prefix. Firmware (wl) components should use the
47  * convention to prefix the error code name with WL_<Component>_E_ (e.g. WL_NAN_E_?).
48  * Non-wl components, other than common error codes use BCM_<Componennt>_E_
49  * prefix(e.g. BCM_FWSIGN_E_).
50  *
51  * End Note
52  */
53 
54 typedef int bcmerror_t;
55 
56 /*
57  * error codes could be added but the defined ones shouldn't be changed/deleted
58  * these error codes are exposed to the user code
59  * when ever a new error code is added to this list
60  * please update errorstring table with the related error string and
61  * update osl files with os specific errorcode map
62 */
63 
64 #define BCME_OK				0	/* Success */
65 #define BCME_ERROR			-1	/* Error generic */
66 #define BCME_BADARG			-2	/* Bad Argument */
67 #define BCME_BADOPTION			-3	/* Bad option */
68 #define BCME_NOTUP			-4	/* Not up */
69 #define BCME_NOTDOWN			-5	/* Not down */
70 #define BCME_NOTAP			-6	/* Not AP */
71 #define BCME_NOTSTA			-7	/* Not STA  */
72 #define BCME_BADKEYIDX			-8	/* BAD Key Index */
73 #define BCME_RADIOOFF			-9	/* Radio Off */
74 #define BCME_NOTBANDLOCKED		-10	/* Not  band locked */
75 #define BCME_NOCLK			-11	/* No Clock */
76 #define BCME_BADRATESET			-12	/* BAD Rate valueset */
77 #define BCME_BADBAND			-13	/* BAD Band */
78 #define BCME_BUFTOOSHORT		-14	/* Buffer too short */
79 #define BCME_BUFTOOLONG			-15	/* Buffer too long */
80 #define BCME_BUSY			-16	/* Busy */
81 #define BCME_NOTASSOCIATED		-17	/* Not Associated */
82 #define BCME_BADSSIDLEN			-18	/* Bad SSID len */
83 #define BCME_OUTOFRANGECHAN		-19	/* Out of Range Channel */
84 #define BCME_BADCHAN			-20	/* Bad Channel */
85 #define BCME_BADADDR			-21	/* Bad Address */
86 #define BCME_NORESOURCE			-22	/* Not Enough Resources */
87 #define BCME_UNSUPPORTED		-23	/* Unsupported */
88 #define BCME_BADLEN			-24	/* Bad length */
89 #define BCME_NOTREADY			-25	/* Not Ready */
90 #define BCME_EPERM			-26	/* Not Permitted */
91 #define BCME_NOMEM			-27	/* No Memory */
92 #define BCME_ASSOCIATED			-28	/* Associated */
93 #define BCME_RANGE			-29	/* Not In Range */
94 #define BCME_NOTFOUND			-30	/* Not Found */
95 #define BCME_WME_NOT_ENABLED		-31	/* WME Not Enabled */
96 #define BCME_TSPEC_NOTFOUND		-32	/* TSPEC Not Found */
97 #define BCME_ACM_NOTSUPPORTED		-33	/* ACM Not Supported */
98 #define BCME_NOT_WME_ASSOCIATION	-34	/* Not WME Association */
99 #define BCME_SDIO_ERROR			-35	/* SDIO Bus Error */
100 #define BCME_DONGLE_DOWN		-36	/* Dongle Not Accessible */
101 #define BCME_VERSION			-37	/* Incorrect version */
102 #define BCME_TXFAIL			-38	/* TX failure */
103 #define BCME_RXFAIL			-39	/* RX failure */
104 #define BCME_NODEVICE			-40	/* Device not present */
105 #define BCME_NMODE_DISABLED		-41	/* NMODE disabled */
106 #define BCME_MSCH_DUP_REG		-42	/* Duplicate slot registration */
107 #define BCME_SCANREJECT			-43	/* reject scan request */
108 #define BCME_USAGE_ERROR		-44	/* WLCMD usage error */
109 #define BCME_IOCTL_ERROR		-45	/* WLCMD ioctl error */
110 #define BCME_SERIAL_PORT_ERR		-46	/* RWL serial port error */
111 #define BCME_DISABLED			-47	/* Disabled in this build */
112 #define BCME_DECERR			-48	/* Decrypt error */
113 #define BCME_ENCERR			-49	/* Encrypt error */
114 #define BCME_MICERR			-50	/* Integrity/MIC error */
115 #define BCME_REPLAY			-51	/* Replay */
116 #define BCME_IE_NOTFOUND		-52	/* IE not found */
117 #define BCME_DATA_NOTFOUND		-53	/* Complete data not found in buffer */
118 #define BCME_NOT_GC			-54	/* expecting a group client */
119 #define BCME_PRS_REQ_FAILED		-55	/* GC presence req failed to sent */
120 #define BCME_NO_P2P_SE			-56	/* Could not find P2P-Subelement */
121 #define BCME_NOA_PND			-57	/* NoA pending, CB shuld be NULL */
122 #define BCME_FRAG_Q_FAILED		-58	/* queueing 80211 frag failedi */
123 #define BCME_GET_AF_FAILED		-59	/* Get p2p AF pkt failed */
124 #define BCME_MSCH_NOTREADY		-60	/* scheduler not ready */
125 #define BCME_IOV_LAST_CMD		-61	/* last batched iov sub-command */
126 #define BCME_MINIPMU_CAL_FAIL		-62	/* MiniPMU cal failed */
127 #define BCME_RCAL_FAIL			-63	/* Rcal failed */
128 #define BCME_LPF_RCCAL_FAIL		-64	/* RCCAL failed */
129 #define BCME_DACBUF_RCCAL_FAIL		-65	/* RCCAL failed */
130 #define BCME_VCOCAL_FAIL		-66	/* VCOCAL failed */
131 #define BCME_BANDLOCKED			-67	/* interface is restricted to a band */
132 #define BCME_BAD_IE_DATA		-68	/* Recieved ie with invalid/bad data */
133 #define BCME_REG_FAILED			-69	/* Generic registration failed */
134 #define BCME_NOCHAN			-70	/* Registration with 0 chans in list */
135 #define BCME_PKTTOSS			-71	/* Pkt tossed */
136 #define BCME_DNGL_DEVRESET		-72	/* dongle re-attach during DEVRESET */
137 #define BCME_ROAM			-73	/* Roam related failures */
138 #define BCME_NO_SIG_FILE		-74	/* Signature file is missing */
139 
140 #define BCME_LAST			BCME_NO_SIG_FILE
141 
142 #define BCME_NOTENABLED BCME_DISABLED
143 
144 /* This error code is *internal* to the driver, and is not propogated to users. It should
145  * only be used by IOCTL patch handlers as an indication that it did not handle the IOCTL.
146  * (Since the error code is internal, an entry in 'BCMERRSTRINGTABLE' is not required,
147  * nor does it need to be part of any OSL driver-to-OS error code mapping).
148  */
149 #define BCME_IOCTL_PATCH_UNSUPPORTED	-9999
150 #if (BCME_LAST <= BCME_IOCTL_PATCH_UNSUPPORTED)
151 	#error "BCME_LAST <= BCME_IOCTL_PATCH_UNSUPPORTED"
152 #endif
153 
154 /* These are collection of BCME Error strings */
155 #define BCMERRSTRINGTABLE {		\
156 	"OK",				\
157 	"Undefined error",		\
158 	"Bad Argument",			\
159 	"Bad Option",			\
160 	"Not up",			\
161 	"Not down",			\
162 	"Not AP",			\
163 	"Not STA",			\
164 	"Bad Key Index",		\
165 	"Radio Off",			\
166 	"Not band locked",		\
167 	"No clock",			\
168 	"Bad Rate valueset",		\
169 	"Bad Band",			\
170 	"Buffer too short",		\
171 	"Buffer too long",		\
172 	"Busy",				\
173 	"Not Associated",		\
174 	"Bad SSID len",			\
175 	"Out of Range Channel",		\
176 	"Bad Channel",			\
177 	"Bad Address",			\
178 	"Not Enough Resources",		\
179 	"Unsupported",			\
180 	"Bad length",			\
181 	"Not Ready",			\
182 	"Not Permitted",		\
183 	"No Memory",			\
184 	"Associated",			\
185 	"Not In Range",			\
186 	"Not Found",			\
187 	"WME Not Enabled",		\
188 	"TSPEC Not Found",		\
189 	"ACM Not Supported",		\
190 	"Not WME Association",		\
191 	"SDIO Bus Error",		\
192 	"Dongle Not Accessible",	\
193 	"Incorrect version",		\
194 	"TX Failure",			\
195 	"RX Failure",			\
196 	"Device Not Present",		\
197 	"NMODE Disabled",		\
198 	"Host Offload in device",	\
199 	"Scan Rejected",		\
200 	"WLCMD usage error",		\
201 	"WLCMD ioctl error",		\
202 	"RWL serial port error",	\
203 	"Disabled",			\
204 	"Decrypt error",		\
205 	"Encrypt error",		\
206 	"MIC error",			\
207 	"Replay",			\
208 	"IE not found",			\
209 	"Data not found",		\
210 	"NOT GC",			\
211 	"PRS REQ FAILED",		\
212 	"NO P2P SubElement",		\
213 	"NOA Pending",			\
214 	"FRAG Q FAILED",		\
215 	"GET ActionFrame failed",	\
216 	"scheduler not ready",		\
217 	"Last IOV batched sub-cmd",	\
218 	"Mini PMU Cal failed",		\
219 	"R-cal failed",			\
220 	"LPF RC Cal failed",		\
221 	"DAC buf RC Cal failed",	\
222 	"VCO Cal failed",		\
223 	"band locked",			\
224 	"Recieved ie with invalid data", \
225 	"registration failed",		\
226 	"Registration with zero channels", \
227 	"pkt toss",			\
228 	"Dongle Devreset",		\
229 	"Critical roam in progress",	\
230 	"Signature file is missing",	\
231 }
232 
233 /** status - TBD BCME_ vs proxd status - range reserved for BCME_ */
234 enum {
235 	WL_PROXD_E_LAST			= -1057,
236 	WL_PROXD_E_ASSOC_INPROG		= -1057,
237 	WL_PROXD_E_NOAVAIL		= -1056,
238 	WL_PROXD_E_EXT_SCHED		= -1055,
239 	WL_PROXD_E_NOT_BCM		= -1054,
240 	WL_PROXD_E_FRAME_TYPE		= -1053,
241 	WL_PROXD_E_VERNOSUPPORT		= -1052,
242 	WL_PROXD_E_SEC_NOKEY		= -1051,
243 	WL_PROXD_E_SEC_POLICY		= -1050,
244 	WL_PROXD_E_SCAN_INPROCESS	= -1049,
245 	WL_PROXD_E_BAD_PARTIAL_TSF	= -1048,
246 	WL_PROXD_E_SCANFAIL		= -1047,
247 	WL_PROXD_E_NOTSF		= -1046,
248 	WL_PROXD_E_POLICY		= -1045,
249 	WL_PROXD_E_INCOMPLETE		= -1044,
250 	WL_PROXD_E_OVERRIDDEN		= -1043,
251 	WL_PROXD_E_ASAP_FAILED		= -1042,
252 	WL_PROXD_E_NOTSTARTED		= -1041,
253 	WL_PROXD_E_INVALIDMEAS		= -1040,
254 	WL_PROXD_E_INCAPABLE		= -1039,
255 	WL_PROXD_E_MISMATCH		= -1038,
256 	WL_PROXD_E_DUP_SESSION		= -1037,
257 	WL_PROXD_E_REMOTE_FAIL		= -1036,
258 	WL_PROXD_E_REMOTE_INCAPABLE	= -1035,
259 	WL_PROXD_E_SCHED_FAIL		= -1034,
260 	WL_PROXD_E_PROTO		= -1033,
261 	WL_PROXD_E_EXPIRED		= -1032,
262 	WL_PROXD_E_TIMEOUT		= -1031,
263 	WL_PROXD_E_NOACK		= -1030,
264 	WL_PROXD_E_DEFERRED		= -1029,
265 	WL_PROXD_E_INVALID_SID		= -1028,
266 	WL_PROXD_E_REMOTE_CANCEL	= -1027,
267 	WL_PROXD_E_CANCELED		= -1026,	/**< local */
268 	WL_PROXD_E_INVALID_SESSION	= -1025,
269 	WL_PROXD_E_BAD_STATE		= -1024,
270 	WL_PROXD_E_START		= -1024,
271 	WL_PROXD_E_ERROR		= -1,
272 	WL_PROXD_E_OK			= 0
273 };
274 typedef int32 wl_proxd_status_t;
275 
276 /** status - TBD BCME_ vs NAN status - range reserved for BCME_ */
277 enum {
278 	/* add new status here... */
279 	WL_NAN_E_NO_ACTION		= -2136,	/* status for no action */
280 	WL_NAN_E_INVALID_TOKEN		= -2135,	/* invalid token or mismatch */
281 	WL_NAN_E_INVALID_ATTR		= -2134,	/* generic invalid attr error */
282 	WL_NAN_E_INVALID_NDL_ATTR	= -2133,	/* invalid NDL attribute */
283 	WL_NAN_E_SCB_NORESOURCE		= -2132,	/* no more peer scb available */
284 	WL_NAN_E_PEER_NOTAVAIL		= -2131,
285 	WL_NAN_E_SCB_EXISTS		= -2130,
286 	WL_NAN_E_INVALID_PEER_NDI	= -2129,
287 	WL_NAN_E_INVALID_LOCAL_NDI	= -2128,
288 	WL_NAN_E_ALREADY_EXISTS		= -2127,	/* generic NAN error for duplication */
289 	WL_NAN_E_EXCEED_MAX_NUM_MAPS	= -2126,
290 	WL_NAN_E_INVALID_DEV_CHAN_SCHED	= -2125,
291 	WL_NAN_E_INVALID_PEER_BLOB_TYPE	= -2124,
292 	WL_NAN_E_INVALID_LCL_BLOB_TYPE	= -2123,
293 	WL_NAN_E_BCMC_PDPA		= -2122,	/* BCMC NAF PDPA */
294 	WL_NAN_E_TIMEOUT		= -2121,
295 	WL_NAN_E_HOST_CFG		= -2120,
296 	WL_NAN_E_NO_ACK			= -2119,
297 	WL_NAN_E_SECINST_FAIL		= -2118,
298 	WL_NAN_E_REJECT_NDL		= -2117,	/* generic NDL rejection error */
299 	WL_NAN_E_INVALID_NDP_ATTR	= -2116,
300 	WL_NAN_E_HOST_REJECTED		= -2115,
301 	WL_NAN_E_PCB_NORESOURCE		= -2114,
302 	WL_NAN_E_NDC_EXISTS		= -2113,
303 	WL_NAN_E_NO_NDC_ENTRY_AVAIL	= -2112,
304 	WL_NAN_E_INVALID_NDC_ENTRY      = -2111,
305 	WL_NAN_E_SD_TX_LIST_FULL        = -2110,
306 	WL_NAN_E_SVC_SUB_LIST_FULL      = -2109,
307 	WL_NAN_E_SVC_PUB_LIST_FULL      = -2108,
308 	WL_NAN_E_SDF_MAX_LEN_EXCEEDED   = -2107,
309 	WL_NAN_E_ZERO_CRB		= -2106,	/* no CRB between local and peer */
310 	WL_NAN_E_PEER_NDC_NOT_SELECTED	= -2105,	/* peer ndc not selected */
311 	WL_NAN_E_DAM_CHAN_CONFLICT	= -2104,	/* dam schedule channel conflict */
312 	WL_NAN_E_DAM_SCHED_PERIOD	= -2103,	/* dam schedule period mismatch */
313 	WL_NAN_E_LCL_NDC_NOT_SELECTED	= -2102,	/* local selected ndc not configured */
314 	WL_NAN_E_NDL_QOS_INVALID_NA	= -2101,	/* na doesn't comply with ndl qos */
315 	WL_NAN_E_CLEAR_NAF_WITH_SA_AS_RNDI = -2100,	/* rx clear naf with peer rndi */
316 	WL_NAN_E_SEC_CLEAR_PKT		= -2099,	/* rx clear pkt from a peer with sec_sa */
317 	WL_NAN_E_PROT_NON_PDPA_NAF	= -2098,	/* rx protected non PDPA frame */
318 	WL_NAN_E_DAM_DOUBLE_REMOVE	= -2097,	/* remove peer schedule already removed */
319 	WL_NAN_E_DAM_DOUBLE_MERGE	= -2096,	/* merge peer schedule already merged */
320 	WL_NAN_E_DAM_REJECT_INVALID	= -2095,	/* reject for invalid schedule */
321 	WL_NAN_E_DAM_REJECT_RANGE	= -2094,
322 	WL_NAN_E_DAM_REJECT_QOS		= -2093,
323 	WL_NAN_E_DAM_REJECT_NDC		= -2092,
324 	WL_NAN_E_DAM_REJECT_PEER_IMMUT	= -2091,
325 	WL_NAN_E_DAM_REJECT_LCL_IMMUT	= -2090,
326 	WL_NAN_E_DAM_EXCEED_NUM_SCHED	= -2089,
327 	WL_NAN_E_DAM_INVALID_SCHED_MAP	= -2088,	/* invalid schedule map list */
328 	WL_NAN_E_DAM_INVALID_LCL_SCHED	= -2087,
329 	WL_NAN_E_INVALID_MAP_ID		= -2086,
330 	WL_NAN_E_CHAN_OVERLAP_ACROSS_MAP = -2085,
331 	WL_NAN_E_INVALID_CHAN_LIST	= -2084,
332 	WL_NAN_E_INVALID_RANGE_TBMP	= -2083,
333 	WL_NAN_E_INVALID_IMMUT_SCHED	= -2082,
334 	WL_NAN_E_INVALID_NDC_ATTR	= -2081,
335 	WL_NAN_E_INVALID_TIME_BITMAP	= -2080,
336 	WL_NAN_E_INVALID_NA_ATTR	= -2079,
337 	WL_NAN_E_NO_NA_ATTR_IN_AVAIL_MAP = -2078,	/* no na attr saved in avail map */
338 	WL_NAN_E_INVALID_MAP_IDX	= -2077,
339 	WL_NAN_E_SEC_SA_NOTFOUND	= -2076,
340 	WL_NAN_E_BSSCFG_NOTFOUND	= -2075,
341 	WL_NAN_E_SCB_NOTFOUND		= -2074,
342 	WL_NAN_E_NCS_SK_KDESC_TYPE      = -2073,
343 	WL_NAN_E_NCS_SK_KEY_DESC_VER    = -2072,	/* key descr ver */
344 	WL_NAN_E_NCS_SK_KEY_TYPE        = -2071,	/* key descr type */
345 	WL_NAN_E_NCS_SK_KEYINFO_FAIL    = -2070,	/* key info (generic) */
346 	WL_NAN_E_NCS_SK_KEY_LEN         = -2069,	/* key len */
347 	WL_NAN_E_NCS_SK_KDESC_NOT_FOUND = -2068,	/* key desc not found */
348 	WL_NAN_E_NCS_SK_INVALID_PARAMS  = -2067,	/* invalid args */
349 	WL_NAN_E_NCS_SK_KDESC_INVALID   = -2066,	/* key descr is not valid */
350 	WL_NAN_E_NCS_SK_NONCE_MISMATCH  = -2065,
351 	WL_NAN_E_NCS_SK_KDATA_SAVE_FAIL = -2064,	/* not able to save key data */
352 	WL_NAN_E_NCS_SK_AUTH_TOKEN_CALC_FAIL = -2063,
353 	WL_NAN_E_NCS_SK_PTK_CALC_FAIL   = -2062,
354 	WL_NAN_E_INVALID_STARTOFFSET	= -2061,
355 	WL_NAN_E_BAD_NA_ENTRY_TYPE	= -2060,
356 	WL_NAN_E_INVALID_CHANBMP	= -2059,
357 	WL_NAN_E_INVALID_OP_CLASS	= -2058,
358 	WL_NAN_E_NO_IES			= -2057,
359 	WL_NAN_E_NO_PEER_ENTRY_AVAIL	= -2056,
360 	WL_NAN_E_INVALID_PEER		= -2055,
361 	WL_NAN_E_PEER_EXISTS		= -2054,
362 	WL_NAN_E_PEER_NOTFOUND		= -2053,
363 	WL_NAN_E_NO_MEM			= -2052,
364 	WL_NAN_E_INVALID_OPTION		= -2051,
365 	WL_NAN_E_INVALID_BAND		= -2050,
366 	WL_NAN_E_INVALID_MAC		= -2049,
367 	WL_NAN_E_BAD_INSTANCE		= -2048,
368 	/* NAN status code reserved from -2048 to -3071 */
369 	/* Do NOT add new status below -2048 */
370 	WL_NAN_E_ERROR			= -1,
371 	WL_NAN_E_OK			= 0
372 };
373 
374 /* SAE (Simultaneous Authentication of Equals) status codes.
375  * SAE status codes are reserved from -3072 to -4095 (1K)
376  */
377 enum {
378 	WL_SAE_E_AUTH_FAILURE			= -3072,
379 	/* Discard silently */
380 	WL_SAE_E_AUTH_DISCARD			= -3073,
381 	/* Authentication in progress */
382 	WL_SAE_E_AUTH_CONTINUE			= -3074,
383 	/* Invalid scalar/elt */
384 	WL_SAE_E_AUTH_COMMIT_INVALID		= -3075,
385 	/* Invalid confirm token */
386 	WL_SAE_E_AUTH_CONFIRM_INVALID		= -3076,
387 	/* Peer scalar validation failure */
388 	WL_SAE_E_CRYPTO_SCALAR_VALIDATION	= -3077,
389 	/* Peer element prime validation failure */
390 	WL_SAE_E_CRYPTO_ELE_PRIME_VALIDATION	= -3078,
391 	/* Peer element is not on the curve */
392 	WL_SAE_E_CRYPTO_ELE_NOT_ON_CURVE	= -3079,
393 	/* Generic EC error (eliptic curve related) */
394 	WL_SAE_E_CRYPTO_EC_ERROR		= -3080,
395 	/* Both local and peer mac addrs are same */
396 	WL_SAE_E_CRYPTO_EQUAL_MACADDRS		= -3081,
397 	/* Loop exceeded in deriving the scalar */
398 	WL_SAE_E_CRYPTO_SCALAR_ITER_EXCEEDED	= -3082,
399 	/* ECC group is unsupported */
400 	WL_SAE_E_CRYPTO_UNSUPPORTED_GROUP	= -3083,
401 	/* Exceeded the hunting-and-pecking counter */
402 	WL_SAE_E_CRYPTO_PWE_COUNTER_EXCEEDED	= -3084,
403 	/* SAE crypto component is not initialized */
404 	WL_SAE_E_CRYPTO_NOT_INITED		= -3085,
405 	/* bn_get has failed */
406 	WL_SAE_E_CRYPTO_BN_GET_ERROR		= -3086,
407 	/* bn_set has failed */
408 	WL_SAE_E_CRYPTO_BN_SET_ERROR		= -3087,
409 	/* PMK is not computed yet */
410 	WL_SAE_E_CRYPTO_PMK_UNAVAILABLE		= -3088,
411 	/* Peer confirm did not match */
412 	WL_SAE_E_CRYPTO_CONFIRM_MISMATCH	= -3089,
413 	/* Element K is at infinity no the curve */
414 	WL_SAE_E_CRYPTO_KEY_AT_INFINITY		= -3090,
415 	/* SAE Crypto private data magic number mismatch */
416 	WL_SAE_E_CRYPTO_PRIV_MAGIC_MISMATCH	= -3091,
417 	/* Max retry exhausted */
418 	WL_SAE_E_MAX_RETRY_LIMIT_REACHED	= -3092,
419 	/* peer sent password ID mismatch to local */
420 	WL_SAE_E_AUTH_PEER_PWDID_MISMATCH	= -3093,
421 	/* user not configured password */
422 	WL_SAE_E_AUTH_PASSWORD_NOT_CONFIGURED	= -3094,
423 	/* user not configured password ID */
424 	WL_SAE_E_AUTH_PWDID_NOT_CONFIGURED	= -3095,
425 	/* Anti-clogging token mismatch */
426 	WL_SAE_E_AUTH_ANTI_CLOG_MISMATCH	= -3096,
427 	/* SAE PWE method mismatch */
428 	WL_SAE_E_AUTH_PWE_MISMATCH              = -3097
429 };
430 
431 /*
432  * Firmware signing error code range: -4096...-5119
433  */
434 enum {
435 	/* okay */
436 	BCM_FWSIGN_E_OK				= 0,
437 
438 	/* Operation is in progress */
439 	BCM_FWSIGN_E_INPROGRESS			= -4096,
440 
441 	/* version mismatch */
442 	BCM_FWSIGN_E_VERSION			= -4097,
443 
444 	/* key not found */
445 	BCM_FWSIGN_E_KEY_NOT_FOUND		= -4098,
446 
447 	/* key found, but is not valid (revoked) */
448 	BCM_FWSIGN_E_KEY_NOT_VALID		= -4099,
449 
450 	/* Cipher suite id mismatch for the key */
451 	BCM_FWSIGN_E_CS_ID_MISMATCH		= -4100,
452 
453 	/* Signature does not match */
454 	BCM_FWSIGN_E_SIGNATURE			= -4101,
455 
456 	/* Continue */
457 	BCM_FWSIGN_E_CONTINUE			= -4102,
458 
459 	/* Heap is too small */
460 	BCM_FWSIGN_E_HEAP_TOO_SMALL		= -4103,
461 
462 	/* Allocation of bn ctx failed */
463 	BCM_FWSIGN_E_BN_CTX_ALLOC_FAILED	= -4104,
464 
465 	/* possible bug */
466 	BCM_FWSIGN_E_BUGCHECK			= -4105,
467 
468 	/* chosen key is invalid */
469 	BCM_FWSIGN_E_INVALID_KEY		= -4106,
470 
471 	/* signature is invalid */
472 	BCM_FWSIGN_E_INVALID_SIGNATURE		= -4107,
473 
474 	/* signature tlv missing */
475 	BCM_FWSIGN_E_NO_CSID_SIG		= -4108,
476 
477 	/* chosen key is invalid */
478 	BCM_FWSIGN_E_REVOKED_KEY		= -4109,
479 
480 	/* signature has no matching valid key in ROM */
481 	BCM_FWSIGN_E_NO_OTP_FOR_ROM_KEY		= -4110,
482 
483 	/* Compression not supported */
484 	BCM_FWSIGN_E_COMPNOTSUP			= -4111,
485 
486 	/* OTP read error */
487 	BCM_FWSIGN_E_OTP_READ			= -4112,
488 
489 	/* heap address overlaps with FW address space */
490 	BCM_FWSIGN_E_HEAP_OVR_FW		= -4113,
491 
492 	/* heap address overlaps with bootloader data/bss region */
493 	BCM_FWSIGN_E_HEAP_OVR_BSS		= -4114,
494 
495 	/* heap address overlaps with bootloader stack region */
496 	BCM_FWSIGN_E_HEAP_OVR_STACK		= -4115,
497 
498 	/* firmware encryption header tlv is missing */
499 	BCM_FWSIGN_E_NO_FWENC_HDR		= -4116,
500 
501 	/* firmware encryption algo not supported */
502 	BCM_FWSIGN_E_FWENC_ALGO_NOTSUP		= -4117,
503 
504 	/* firmware encryption tag tlv is missing */
505 	BCM_FWSIGN_E_NO_FW_TAG			= -4118,
506 
507 	/* firmware encryption tag tlv is not valid */
508 	BCM_FWSIGN_E_FW_TAG_INVALID_TLV		= -4119,
509 
510 	/* firmware encryption tag verification fail */
511 	BCM_FWSIGN_E_FW_TAG_MISMATCH		= -4120,
512 
513 	/* signature package is invalid */
514 	BCM_FWSIGN_E_PACKAGE_INVALID		= -4121,
515 
516 	/* last error */
517 	BCM_FWSIGN_E_LAST			= -5119
518 };
519 typedef int32 bcm_fwsign_status_t;
520 
521 /* PMK manager block. Event codes from -5120 to -6143 */
522 /* PSK hashing event codes */
523 enum {
524 	WL_PMK_E_PSK_HASH_FAILED		= -5120,
525 	WL_PMK_E_PSK_HASH_DONE			= -5121,
526 	WL_PMK_E_PSK_HASH_RUNNING		= -5122,
527 	WL_PMK_E_PSK_INVALID			= -5123,
528 	WL_PMK_E_PSK_NOMEM			= -5124
529 };
530 
531 /*
532  * SOE (Security Offload Engine) status codes.
533  * SOE status codes are reserved from -6144 to -7167 (1K)
534  */
535 enum {
536 	/* Invalid operational context */
537 	WL_SOE_E_BAD_OP_CONTEXT			= -6144,
538 
539 	/* Invalid operational type */
540 	WL_SOE_E_BAD_OP_TYPE			= -6145,
541 
542 	/* Failure to get NAF3 encoded scalar */
543 	WL_SOE_E_BN_NAF3_GET_ERROR		= -6146,
544 
545 	/* Failure to get NAF3 params */
546 	WL_SOE_E_NAF3_PARAMS_GET_ERROR		= -6147
547 };
548 
549 /* BCM crypto ASN.1 status codes. */
550 /* Reserved range is from -7168 to -8291 */
551 enum {
552 	/* tag mismatch */
553 	BCM_CRYPTO_E_ASN1_TAG_MISMATCH		= -7168,
554 
555 	/* OID mismatch */
556 	BCM_CRYPTO_E_ASN1_OID_MISMATCH		= -7169,
557 
558 	/* Bad key type */
559 	BCM_CRYPTO_E_ASN1_BAD_KEY_TYPE		= -7170,
560 
561 	/* value length is invalid */
562 	BCM_CRYPTO_E_ASN1_INVALID_LENGTH	= -7171,
563 
564 	/* Invalid public key length */
565 	BCM_CRYPTO_E_ASN1_INVALID_PKLEN		= -7172,
566 
567 	/* Unsupported elliptic curve group */
568 	BCM_CRYPTO_E_ASN1_UNSUPPORTED_ECG	= -7173
569 };
570 
571 #endif	/* BCMUTILS_ERR_CODES */
572 
573 #endif	/* _bcmerror_h_ */
574