3 * @file coreconfigurator.h
6 * @sa coreconfigurator.c
12 #ifndef CORECONFIGURATOR_H
13 #define CORECONFIGURATOR_H
15 #include "wilc_wlan_if.h"
16 /*****************************************************************************/
18 /*****************************************************************************/
19 /* Number of WID Options Supported */
20 #define NUM_BASIC_SWITCHES 45
21 #define NUM_FHSS_SWITCHES 0
26 #define NUM_11N_BASIC_SWITCHES 25
27 #define NUM_11N_HUT_SWITCHES 47
28 #else /* MAC_802_11N */
29 #define NUM_11N_BASIC_SWITCHES 0
30 #define NUM_11N_HUT_SWITCHES 0
31 #endif /* MAC_802_11N */
33 extern u16 g_num_total_switches;
35 #define MAC_HDR_LEN 24 /* No Address4 - non-ESS */
36 #define MAX_SSID_LEN 33
38 #define TIME_STAMP_LEN 8
39 #define BEACON_INTERVAL_LEN 2
40 #define CAP_INFO_LEN 2
41 #define STATUS_CODE_LEN 2
46 /* Operating Mode: SET */
48 /* Operating Mode: GET */
51 #define MAX_PACKET_BUFF_SIZE 1596
53 #define MAX_STRING_LEN 256
54 #define MAX_SURVEY_RESULT_FRAG_SIZE MAX_STRING_LEN
55 #define SURVEY_RESULT_LENGTH 44
56 #define MAX_ASSOC_RESP_FRAME_SIZE MAX_STRING_LEN
58 #define STATUS_MSG_LEN 12
59 #define MAC_CONNECTED 1
60 #define MAC_DISCONNECTED 0
64 /*****************************************************************************/
66 /*****************************************************************************/
67 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
68 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
71 /*****************************************************************************/
72 /* Type Definitions */
73 /*****************************************************************************/
74 /* Status Codes for Authentication and Association Frames */
76 SUCCESSFUL_STATUSCODE = 0,
87 SHORT_PREAMBLE_UNSUP = 19,
89 CHANNEL_AGIL_UNSUP = 21,
90 SHORT_SLOT_UNSUP = 25,
92 CONNECT_STS_FORCE_16_BIT = 0xFFFF
97 tenuWIDtype enuWIDtype;
106 s8 as8RSSI[NUM_RSSI];
108 /* This structure is used to support parsing of the received 'N' message */
112 u8 au8ssid[MAX_SSID_LEN];
118 unsigned long u32TimeRcvdInScanCached; /* of type unsigned long to be accepted by the linux kernel macro time_after() */
119 unsigned long u32TimeRcvdInScan;
125 u32 u32Tsf; /* time-stamp [Low only 32 bit] */
131 u64 u64Tsf; /* time-stamp [Low and High 64 bit] */
134 /* This structure is used to support parsing of the received Association Response frame */
137 u16 u16ConnectStatus;
141 } tstrConnectRespInfo;
150 u16 u16ConnectStatus;
159 } tstrDisconnectNotifInfo;
161 #ifndef CONNECT_DIRECT
162 typedef struct wid_site_survey_reslts {
163 char SSID[MAX_SSID_LEN];
171 } wid_site_survey_reslts_s;
174 extern s32 CoreConfiguratorInit(void);
175 extern s32 CoreConfiguratorDeInit(void);
177 extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
178 u32 u32WIDsCount, bool bRespRequired, u32 drvHandler);
179 extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
180 extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
182 extern s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
183 tstrConnectRespInfo **ppstrConnectRespInfo);
184 extern s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo);
186 #ifndef CONNECT_DIRECT
187 extern s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
188 wid_site_survey_reslts_s **ppstrSurveyResults, u32 *pu32SurveyResultsCount);
189 extern s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults);
192 extern s32 SendRawPacket(s8 *pspacket, s32 s32PacketLen);
193 extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
194 void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
195 void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);