staging: wilc1000: remove unused variables
[deliverable/linux.git] / drivers / staging / wilc1000 / coreconfigurator.h
1
2 /*!
3 * @file coreconfigurator.h
4 * @brief
5 * @author
6 * @sa coreconfigurator.c
7 * @date 1 Mar 2012
8 * @version 1.0
9 */
10
11 #ifndef CORECONFIGURATOR_H
12 #define CORECONFIGURATOR_H
13
14 #include "wilc_wlan_if.h"
15 /*****************************************************************************/
16 /* Constants */
17 /*****************************************************************************/
18 /* Number of WID Options Supported */
19 #define NUM_BASIC_SWITCHES 45
20 #define NUM_FHSS_SWITCHES 0
21
22 #define NUM_RSSI 5
23
24 #ifdef MAC_802_11N
25 #define NUM_11N_BASIC_SWITCHES 25
26 #define NUM_11N_HUT_SWITCHES 47
27 #else /* MAC_802_11N */
28 #define NUM_11N_BASIC_SWITCHES 0
29 #define NUM_11N_HUT_SWITCHES 0
30 #endif /* MAC_802_11N */
31
32 #define MAC_HDR_LEN 24 /* No Address4 - non-ESS */
33 #define MAX_SSID_LEN 33
34 #define FCS_LEN 4
35 #define TIME_STAMP_LEN 8
36 #define BEACON_INTERVAL_LEN 2
37 #define CAP_INFO_LEN 2
38 #define STATUS_CODE_LEN 2
39 #define AID_LEN 2
40 #define IE_HDR_LEN 2
41
42 /* Operating Mode: SET */
43 #define SET_CFG 0
44 /* Operating Mode: GET */
45 #define GET_CFG 1
46
47 #define MAX_PACKET_BUFF_SIZE 1596
48
49 #define MAX_STRING_LEN 256
50 #define MAX_SURVEY_RESULT_FRAG_SIZE MAX_STRING_LEN
51 #define SURVEY_RESULT_LENGTH 44
52 #define MAX_ASSOC_RESP_FRAME_SIZE MAX_STRING_LEN
53
54 #define STATUS_MSG_LEN 12
55 #define MAC_CONNECTED 1
56 #define MAC_DISCONNECTED 0
57
58 /*****************************************************************************/
59 /* Function Macros */
60 /*****************************************************************************/
61 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
62 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
63
64 /*****************************************************************************/
65 /* Type Definitions */
66 /*****************************************************************************/
67 /* Status Codes for Authentication and Association Frames */
68 typedef enum {
69 SUCCESSFUL_STATUSCODE = 0,
70 UNSPEC_FAIL = 1,
71 UNSUP_CAP = 10,
72 REASOC_NO_ASOC = 11,
73 FAIL_OTHER = 12,
74 UNSUPT_ALG = 13,
75 AUTH_SEQ_FAIL = 14,
76 CHLNG_FAIL = 15,
77 AUTH_TIMEOUT = 16,
78 AP_FULL = 17,
79 UNSUP_RATE = 18,
80 SHORT_PREAMBLE_UNSUP = 19,
81 PBCC_UNSUP = 20,
82 CHANNEL_AGIL_UNSUP = 21,
83 SHORT_SLOT_UNSUP = 25,
84 OFDM_DSSS_UNSUP = 26,
85 CONNECT_STS_FORCE_16_BIT = 0xFFFF
86 } tenuConnectSts;
87
88 typedef struct {
89 u16 u16WIDid;
90 tenuWIDtype enuWIDtype;
91 s32 s32ValueSize;
92 s8 *ps8WidVal;
93
94 } tstrWID;
95
96 typedef struct {
97 u8 u8Full;
98 u8 u8Index;
99 s8 as8RSSI[NUM_RSSI];
100 } tstrRSSI;
101 /* This structure is used to support parsing of the received 'N' message */
102 typedef struct {
103 s8 s8rssi;
104 u16 u16CapInfo;
105 u8 au8ssid[MAX_SSID_LEN];
106 u8 u8SsidLen;
107 u8 au8bssid[6];
108 u16 u16BeaconPeriod;
109 u8 u8DtimPeriod;
110 u8 u8channel;
111 unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */
112 unsigned long u32TimeRcvdInScan;
113 bool bNewNetwork;
114 #ifdef AGING_ALG
115 u8 u8Found;
116 #endif
117 #ifdef WILC_P2P
118 u32 u32Tsf; /* time-stamp [Low only 32 bit] */
119 #endif
120 u8 *pu8IEs;
121 u16 u16IEsLen;
122 void *pJoinParams;
123 tstrRSSI strRssi;
124 u64 u64Tsf; /* time-stamp [Low and High 64 bit] */
125 } tstrNetworkInfo;
126
127 /* This structure is used to support parsing of the received Association Response frame */
128 typedef struct {
129 u16 u16capability;
130 u16 u16ConnectStatus;
131 u16 u16AssocID;
132 u8 *pu8RespIEs;
133 u16 u16RespIEsLen;
134 } tstrConnectRespInfo;
135
136 typedef struct {
137 u8 au8bssid[6];
138 u8 *pu8ReqIEs;
139 size_t ReqIEsLen;
140 u8 *pu8RespIEs;
141 u16 u16RespIEsLen;
142 u16 u16ConnectStatus;
143 } tstrConnectInfo;
144
145 typedef struct {
146 u16 u16reason;
147 u8 *ie;
148 size_t ie_len;
149 } tstrDisconnectNotifInfo;
150
151 #ifndef CONNECT_DIRECT
152 typedef struct wid_site_survey_reslts {
153 char SSID[MAX_SSID_LEN];
154 u8 BssType;
155 u8 Channel;
156 u8 SecurityStatus;
157 u8 BSSID[6];
158 char RxPower;
159 u8 Reserved;
160
161 } wid_site_survey_reslts_s;
162 #endif
163
164 s32 CoreConfiguratorInit(void);
165 s32 CoreConfiguratorDeInit(void);
166
167 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
168 u32 u32WIDsCount, bool bRespRequired, u32 drvHandler);
169 s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
170 s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
171
172 s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
173 tstrConnectRespInfo **ppstrConnectRespInfo);
174 s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo);
175
176 #ifndef CONNECT_DIRECT
177 s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
178 wid_site_survey_reslts_s **ppstrSurveyResults,
179 u32 *pu32SurveyResultsCount);
180 s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults);
181 #endif
182
183 s32 SendRawPacket(s8 *pspacket, s32 s32PacketLen);
184 void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
185 void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
186 void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);
187
188 #endif
This page took 0.051814 seconds and 5 git commands to generate.