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_PACKET_BUFF_SIZE 1596
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
54 #define STATUS_MSG_LEN 12
55 #define MAC_CONNECTED 1
56 #define MAC_DISCONNECTED 0
58 /*****************************************************************************/
60 /*****************************************************************************/
61 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
62 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
64 /*****************************************************************************/
65 /* Type Definitions */
66 /*****************************************************************************/
67 /* Status Codes for Authentication and Association Frames */
69 SUCCESSFUL_STATUSCODE
= 0,
80 SHORT_PREAMBLE_UNSUP
= 19,
82 CHANNEL_AGIL_UNSUP
= 21,
83 SHORT_SLOT_UNSUP
= 25,
85 CONNECT_STS_FORCE_16_BIT
= 0xFFFF
90 tenuWIDtype enuWIDtype
;
101 /* This structure is used to support parsing of the received 'N' message */
105 u8 au8ssid
[MAX_SSID_LEN
];
111 unsigned long u32TimeRcvdInScanCached
; /* of type unsigned long to be accepted by the linux kernel macro time_after() */
112 unsigned long u32TimeRcvdInScan
;
118 u32 u32Tsf
; /* time-stamp [Low only 32 bit] */
124 u64 u64Tsf
; /* time-stamp [Low and High 64 bit] */
127 /* This structure is used to support parsing of the received Association Response frame */
130 u16 u16ConnectStatus
;
134 } tstrConnectRespInfo
;
142 u16 u16ConnectStatus
;
149 } tstrDisconnectNotifInfo
;
151 #ifndef CONNECT_DIRECT
152 typedef struct wid_site_survey_reslts
{
153 char SSID
[MAX_SSID_LEN
];
161 } wid_site_survey_reslts_s
;
164 s32
CoreConfiguratorInit(void);
165 s32
CoreConfiguratorDeInit(void);
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
);
172 s32
ParseAssocRespInfo(u8
*pu8Buffer
, u32 u32BufferLen
,
173 tstrConnectRespInfo
**ppstrConnectRespInfo
);
174 s32
DeallocateAssocRespInfo(tstrConnectRespInfo
*pstrConnectRespInfo
);
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
);
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
);