3 * @file coreconfigurator.h
6 * @sa coreconfigurator.c
11 #ifndef CORECONFIGURATOR_H
12 #define CORECONFIGURATOR_H
14 #include "wilc_wlan_if.h"
15 /*****************************************************************************/
17 /*****************************************************************************/
18 /* Number of WID Options Supported */
19 #define NUM_BASIC_SWITCHES 45
20 #define NUM_FHSS_SWITCHES 0
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 */
32 #define MAC_HDR_LEN 24 /* No Address4 - non-ESS */
33 #define MAX_SSID_LEN 33
35 #define TIME_STAMP_LEN 8
36 #define BEACON_INTERVAL_LEN 2
37 #define CAP_INFO_LEN 2
38 #define STATUS_CODE_LEN 2
42 /* Operating Mode: SET */
44 /* Operating Mode: GET */
47 #define MAX_STRING_LEN 256
48 #define MAX_SURVEY_RESULT_FRAG_SIZE MAX_STRING_LEN
49 #define SURVEY_RESULT_LENGTH 44
50 #define MAX_ASSOC_RESP_FRAME_SIZE MAX_STRING_LEN
52 #define MAC_CONNECTED 1
53 #define MAC_DISCONNECTED 0
55 /*****************************************************************************/
57 /*****************************************************************************/
58 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
59 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
61 /*****************************************************************************/
62 /* Type Definitions */
63 /*****************************************************************************/
64 /* Status Codes for Authentication and Association Frames */
66 SUCCESSFUL_STATUSCODE = 0,
77 SHORT_PREAMBLE_UNSUP = 19,
79 CHANNEL_AGIL_UNSUP = 21,
80 SHORT_SLOT_UNSUP = 25,
82 CONNECT_STS_FORCE_16_BIT = 0xFFFF
87 tenuWIDtype enuWIDtype;
98 /* This structure is used to support parsing of the received 'N' message */
102 u8 au8ssid[MAX_SSID_LEN];
108 unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */
109 unsigned long u32TimeRcvdInScan;
114 u32 u32Tsf; /* time-stamp [Low only 32 bit] */
119 u64 u64Tsf; /* time-stamp [Low and High 64 bit] */
122 /* This structure is used to support parsing of the received Association Response frame */
125 u16 u16ConnectStatus;
129 } tstrConnectRespInfo;
137 u16 u16ConnectStatus;
144 } tstrDisconnectNotifInfo;
146 #ifndef CONNECT_DIRECT
147 typedef struct wid_site_survey_reslts {
148 char SSID[MAX_SSID_LEN];
156 } wid_site_survey_reslts_s;
159 s32 CoreConfiguratorDeInit(void);
161 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
162 u32 u32WIDsCount, bool bRespRequired, u32 drvHandler);
163 s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
164 s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
166 s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
167 tstrConnectRespInfo **ppstrConnectRespInfo);
168 s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo);
170 #ifndef CONNECT_DIRECT
171 s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
172 wid_site_survey_reslts_s **ppstrSurveyResults,
173 u32 *pu32SurveyResultsCount);
174 s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults);
177 void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
178 void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
179 void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);