Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
[cascardo/linux.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 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 /* MAC address */
22 typedef struct
23 {
24     u8 a[6];
25 } CsrWifiMacAddress;
26
27 /* IPv4 address */
28 typedef struct
29 {
30     u8 a[4];
31 } CsrWifiIp4Address;
32
33 /* IPv6 address */
34 typedef struct
35 {
36     u8 a[16];
37 } CsrWifiIp6Address;
38
39 typedef struct
40 {
41     u8 ssid[32];
42     u8 length;
43 } CsrWifiSsid;
44
45 /*******************************************************************************
46
47   DESCRIPTION
48     Result values used on the Wifi Interfaces
49
50  VALUES
51     CSR_RESULT_SUCCESS
52                    - The request/procedure succeeded
53     CSR_RESULT_FAILURE
54                    - The request/procedure did not succeed because of an error
55     CSR_WIFI_RESULT_NOT_FOUND
56                    - The request did not succeed because some resource was not
57                      found.
58     CSR_WIFI_RESULT_TIMED_OUT
59                    - The request/procedure did not succeed because of a time out
60     CSR_WIFI_RESULT_CANCELLED
61                    - The request was canceled due to another conflicting
62                      request that was issued before this one was completed
63     CSR_WIFI_RESULT_INVALID_PARAMETER
64                    - The request/procedure did not succeed because it had an
65                      invalid parameter
66     CSR_WIFI_RESULT_NO_ROOM
67                    - The request did not succeed due to a lack of resources,
68                      e.g. out of memory problem.
69     CSR_WIFI_RESULT_UNSUPPORTED
70                    - The request/procedure did not succeed because the feature
71                      is not supported yet
72     CSR_WIFI_RESULT_UNAVAILABLE
73                    - The request cannot be processed at this time
74     CSR_WIFI_RESULT_WIFI_OFF
75                    - The requested action is not available because Wi-Fi is
76                      currently off
77     CSR_WIFI_RESULT_SECURITY_ERROR
78                    - The request/procedure did not succeed because of a security
79                      error
80     CSR_WIFI_RESULT_MIB_SET_FAILURE
81                    - MIB Set Failure: either the MIB OID to be written to does
82                      not exist or the MIB Value is invalid.
83     CSR_WIFI_RESULT_INVALID_INTERFACE_TAG
84                    - The supplied Interface Tag is not valid.
85     CSR_WIFI_RESULT_P2P_NOA_CONFIG_CONFLICT
86                    - The new NOA configuration conflicts with the existing NOA configuration
87                      hence not accepted"
88 *******************************************************************************/
89 #define CSR_WIFI_RESULT_NOT_FOUND                 ((CsrResult) 0x0001)
90 #define CSR_WIFI_RESULT_TIMED_OUT                 ((CsrResult) 0x0002)
91 #define CSR_WIFI_RESULT_CANCELLED                 ((CsrResult) 0x0003)
92 #define CSR_WIFI_RESULT_INVALID_PARAMETER         ((CsrResult) 0x0004)
93 #define CSR_WIFI_RESULT_NO_ROOM                   ((CsrResult) 0x0005)
94 #define CSR_WIFI_RESULT_UNSUPPORTED               ((CsrResult) 0x0006)
95 #define CSR_WIFI_RESULT_UNAVAILABLE               ((CsrResult) 0x0007)
96 #define CSR_WIFI_RESULT_WIFI_OFF                  ((CsrResult) 0x0008)
97 #define CSR_WIFI_RESULT_SECURITY_ERROR            ((CsrResult) 0x0009)
98 #define CSR_WIFI_RESULT_MIB_SET_FAILURE           ((CsrResult) 0x000A)
99 #define CSR_WIFI_RESULT_INVALID_INTERFACE_TAG     ((CsrResult) 0x000B)
100 #define CSR_WIFI_RESULT_P2P_NOA_CONFIG_CONFLICT   ((CsrResult) 0x000C)
101
102 #define CSR_WIFI_VERSION        "5.1.0.0"
103
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif
109