Merge git://git.infradead.org/users/willy/linux-nvme
[firefly-linux-kernel-4.4.55.git] / drivers / staging / csr / csr_wifi_common.h
1 /*****************************************************************************
2
3             (c) Cambridge Silicon Radio Limited 2011
4             All rights reserved and confidential information of CSR
5
6             Refer to LICENSE.txt included with this source for details
7             on the license terms.
8
9 *****************************************************************************/
10
11 #ifndef CSR_WIFI_COMMON_H__
12 #define CSR_WIFI_COMMON_H__
13
14 #include <linux/types.h>
15 #include "csr_result.h"
16
17 /* MAC address */
18 typedef struct
19 {
20     u8 a[6];
21 } CsrWifiMacAddress;
22
23 /* IPv4 address */
24 typedef struct
25 {
26     u8 a[4];
27 } CsrWifiIp4Address;
28
29 /* IPv6 address */
30 typedef struct
31 {
32     u8 a[16];
33 } CsrWifiIp6Address;
34
35 typedef struct
36 {
37     u8 ssid[32];
38     u8 length;
39 } CsrWifiSsid;
40
41 /*******************************************************************************
42
43   DESCRIPTION
44     Result values used on the Wifi Interfaces
45
46  VALUES
47     CSR_RESULT_SUCCESS
48                    - The request/procedure succeeded
49     CSR_RESULT_FAILURE
50                    - The request/procedure did not succeed because of an error
51     CSR_WIFI_RESULT_NOT_FOUND
52                    - The request did not succeed because some resource was not
53                      found.
54     CSR_WIFI_RESULT_TIMED_OUT
55                    - The request/procedure did not succeed because of a time out
56     CSR_WIFI_RESULT_CANCELLED
57                    - The request was canceled due to another conflicting
58                      request that was issued before this one was completed
59     CSR_WIFI_RESULT_INVALID_PARAMETER
60                    - The request/procedure did not succeed because it had an
61                      invalid parameter
62     CSR_WIFI_RESULT_NO_ROOM
63                    - The request did not succeed due to a lack of resources,
64                      e.g. out of memory problem.
65     CSR_WIFI_RESULT_UNSUPPORTED
66                    - The request/procedure did not succeed because the feature
67                      is not supported yet
68     CSR_WIFI_RESULT_UNAVAILABLE
69                    - The request cannot be processed at this time
70     CSR_WIFI_RESULT_WIFI_OFF
71                    - The requested action is not available because Wi-Fi is
72                      currently off
73     CSR_WIFI_RESULT_SECURITY_ERROR
74                    - The request/procedure did not succeed because of a security
75                      error
76     CSR_WIFI_RESULT_MIB_SET_FAILURE
77                    - MIB Set Failure: either the MIB OID to be written to does
78                      not exist or the MIB Value is invalid.
79     CSR_WIFI_RESULT_INVALID_INTERFACE_TAG
80                    - The supplied Interface Tag is not valid.
81     CSR_WIFI_RESULT_P2P_NOA_CONFIG_CONFLICT
82                    - The new NOA configuration conflicts with the existing NOA configuration
83                      hence not accepted"
84 *******************************************************************************/
85 #define CSR_WIFI_RESULT_NOT_FOUND                 ((CsrResult) 0x0001)
86 #define CSR_WIFI_RESULT_TIMED_OUT                 ((CsrResult) 0x0002)
87 #define CSR_WIFI_RESULT_CANCELLED                 ((CsrResult) 0x0003)
88 #define CSR_WIFI_RESULT_INVALID_PARAMETER         ((CsrResult) 0x0004)
89 #define CSR_WIFI_RESULT_NO_ROOM                   ((CsrResult) 0x0005)
90 #define CSR_WIFI_RESULT_UNSUPPORTED               ((CsrResult) 0x0006)
91 #define CSR_WIFI_RESULT_UNAVAILABLE               ((CsrResult) 0x0007)
92 #define CSR_WIFI_RESULT_WIFI_OFF                  ((CsrResult) 0x0008)
93 #define CSR_WIFI_RESULT_SECURITY_ERROR            ((CsrResult) 0x0009)
94 #define CSR_WIFI_RESULT_MIB_SET_FAILURE           ((CsrResult) 0x000A)
95 #define CSR_WIFI_RESULT_INVALID_INTERFACE_TAG     ((CsrResult) 0x000B)
96 #define CSR_WIFI_RESULT_P2P_NOA_CONFIG_CONFLICT   ((CsrResult) 0x000C)
97
98 #define CSR_WIFI_VERSION        "5.1.0.0"
99
100 #endif
101