Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 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 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 11 | #ifndef CORECONFIGURATOR_H |
| 12 | #define CORECONFIGURATOR_H |
| 13 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 14 | #include "wilc_wlan_if.h" |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 15 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 16 | #define NUM_BASIC_SWITCHES 45 |
Stanislav Kholmanskikh | 13994d1 | 2015-06-10 21:57:26 +0300 | [diff] [blame] | 17 | #define NUM_FHSS_SWITCHES 0 |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 18 | |
Stanislav Kholmanskikh | 13994d1 | 2015-06-10 21:57:26 +0300 | [diff] [blame] | 19 | #define NUM_RSSI 5 |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 20 | |
| 21 | #ifdef MAC_802_11N |
| 22 | #define NUM_11N_BASIC_SWITCHES 25 |
| 23 | #define NUM_11N_HUT_SWITCHES 47 |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 24 | #else |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 25 | #define NUM_11N_BASIC_SWITCHES 0 |
| 26 | #define NUM_11N_HUT_SWITCHES 0 |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 27 | #endif |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 28 | |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 29 | #define MAC_HDR_LEN 24 |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 30 | #define MAX_SSID_LEN 33 |
| 31 | #define FCS_LEN 4 |
| 32 | #define TIME_STAMP_LEN 8 |
| 33 | #define BEACON_INTERVAL_LEN 2 |
| 34 | #define CAP_INFO_LEN 2 |
| 35 | #define STATUS_CODE_LEN 2 |
| 36 | #define AID_LEN 2 |
| 37 | #define IE_HDR_LEN 2 |
| 38 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 39 | #define SET_CFG 0 |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 40 | #define GET_CFG 1 |
| 41 | |
Stanislav Kholmanskikh | 13994d1 | 2015-06-10 21:57:26 +0300 | [diff] [blame] | 42 | #define MAX_STRING_LEN 256 |
| 43 | #define MAX_SURVEY_RESULT_FRAG_SIZE MAX_STRING_LEN |
| 44 | #define SURVEY_RESULT_LENGTH 44 |
| 45 | #define MAX_ASSOC_RESP_FRAME_SIZE MAX_STRING_LEN |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 46 | |
Stanislav Kholmanskikh | 13994d1 | 2015-06-10 21:57:26 +0300 | [diff] [blame] | 47 | #define MAC_CONNECTED 1 |
| 48 | #define MAC_DISCONNECTED 0 |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 49 | |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 50 | #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb)) |
Chaehyun Lim | 4e4467f | 2015-06-11 14:35:55 +0900 | [diff] [blame] | 51 | #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw)) |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 52 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 53 | typedef enum { |
Stanislav Kholmanskikh | 13994d1 | 2015-06-10 21:57:26 +0300 | [diff] [blame] | 54 | SUCCESSFUL_STATUSCODE = 0, |
| 55 | UNSPEC_FAIL = 1, |
| 56 | UNSUP_CAP = 10, |
| 57 | REASOC_NO_ASOC = 11, |
| 58 | FAIL_OTHER = 12, |
| 59 | UNSUPT_ALG = 13, |
| 60 | AUTH_SEQ_FAIL = 14, |
| 61 | CHLNG_FAIL = 15, |
| 62 | AUTH_TIMEOUT = 16, |
| 63 | AP_FULL = 17, |
| 64 | UNSUP_RATE = 18, |
| 65 | SHORT_PREAMBLE_UNSUP = 19, |
| 66 | PBCC_UNSUP = 20, |
| 67 | CHANNEL_AGIL_UNSUP = 21, |
| 68 | SHORT_SLOT_UNSUP = 25, |
| 69 | OFDM_DSSS_UNSUP = 26, |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 70 | CONNECT_STS_FORCE_16_BIT = 0xFFFF |
| 71 | } tenuConnectSts; |
| 72 | |
Leo Kim | e9e0c26 | 2015-10-12 16:55:41 +0900 | [diff] [blame] | 73 | struct wid { |
Leo Kim | daaf16b | 2015-10-12 16:55:44 +0900 | [diff] [blame] | 74 | u16 id; |
Glen Lee | 50327db | 2015-11-03 16:20:58 +0900 | [diff] [blame] | 75 | enum wid_type type; |
Leo Kim | 2fd3e44 | 2015-10-12 16:55:45 +0900 | [diff] [blame] | 76 | s32 size; |
Leo Kim | 900bb4a | 2015-10-12 16:55:46 +0900 | [diff] [blame] | 77 | s8 *val; |
Leo Kim | e9e0c26 | 2015-10-12 16:55:41 +0900 | [diff] [blame] | 78 | }; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 79 | |
| 80 | typedef struct { |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 81 | u8 u8Full; |
| 82 | u8 u8Index; |
Chaehyun Lim | ca356ad | 2015-06-11 14:35:57 +0900 | [diff] [blame] | 83 | s8 as8RSSI[NUM_RSSI]; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 84 | } tstrRSSI; |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 85 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 86 | typedef struct { |
Chaehyun Lim | ca356ad | 2015-06-11 14:35:57 +0900 | [diff] [blame] | 87 | s8 s8rssi; |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 88 | u16 u16CapInfo; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 89 | u8 au8ssid[MAX_SSID_LEN]; |
| 90 | u8 u8SsidLen; |
| 91 | u8 au8bssid[6]; |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 92 | u16 u16BeaconPeriod; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 93 | u8 u8DtimPeriod; |
| 94 | u8 u8channel; |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 95 | unsigned long u32TimeRcvdInScanCached; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 96 | unsigned long u32TimeRcvdInScan; |
Dean Lee | 72ed4dc | 2015-06-12 14:11:44 +0900 | [diff] [blame] | 97 | bool bNewNetwork; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 98 | u8 u8Found; |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 99 | u32 u32Tsf; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 100 | u8 *pu8IEs; |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 101 | u16 u16IEsLen; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 102 | void *pJoinParams; |
| 103 | tstrRSSI strRssi; |
Chaehyun Lim | 36cca3b | 2015-09-22 22:47:42 +0900 | [diff] [blame] | 104 | u64 u64Tsf; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 105 | } tstrNetworkInfo; |
| 106 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 107 | typedef struct { |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 108 | u16 u16capability; |
| 109 | u16 u16ConnectStatus; |
| 110 | u16 u16AssocID; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 111 | u8 *pu8RespIEs; |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 112 | u16 u16RespIEsLen; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 113 | } tstrConnectRespInfo; |
| 114 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 115 | typedef struct { |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 116 | u8 au8bssid[6]; |
| 117 | u8 *pu8ReqIEs; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 118 | size_t ReqIEsLen; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 119 | u8 *pu8RespIEs; |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 120 | u16 u16RespIEsLen; |
| 121 | u16 u16ConnectStatus; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 122 | } tstrConnectInfo; |
| 123 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 124 | typedef struct { |
Chaehyun Lim | d85f532 | 2015-06-11 14:35:54 +0900 | [diff] [blame] | 125 | u16 u16reason; |
Greg Kroah-Hartman | 63d03e4 | 2015-06-02 14:16:04 +0900 | [diff] [blame] | 126 | u8 *ie; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 127 | size_t ie_len; |
| 128 | } tstrDisconnectNotifInfo; |
| 129 | |
Glen Lee | ec62e6d | 2015-11-18 15:11:33 +0900 | [diff] [blame] | 130 | s32 wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids, |
| 131 | u32 count, u32 drv); |
Arnd Bergmann | 0e1af73 | 2015-11-16 15:04:54 +0100 | [diff] [blame] | 132 | s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); |
| 133 | s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo); |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 134 | |
Arnd Bergmann | 0e1af73 | 2015-11-16 15:04:54 +0100 | [diff] [blame] | 135 | s32 wilc_parse_assoc_resp_info(u8 *pu8Buffer, u32 u32BufferLen, |
Joe Perches | b3ff291 | 2015-08-10 14:51:33 -0700 | [diff] [blame] | 136 | tstrConnectRespInfo **ppstrConnectRespInfo); |
Arnd Bergmann | 0e1af73 | 2015-11-16 15:04:54 +0100 | [diff] [blame] | 137 | s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo); |
Glen Lee | cd04d22 | 2015-12-21 14:18:42 +0900 | [diff] [blame] | 138 | void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer, |
| 139 | u32 u32Length); |
| 140 | void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer, |
| 141 | u32 u32Length); |
| 142 | void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer, |
| 143 | u32 u32Length); |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 144 | #endif |