natasha.huang | eddf9a5 | 2016-11-15 10:18:59 +0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * This file is provided under a dual license. When you use or |
| 4 | * distribute this software, you may choose to be licensed under |
| 5 | * version 2 of the GNU General Public License ("GPLv2 License") |
| 6 | * or BSD License. |
| 7 | * |
| 8 | * GPLv2 License |
| 9 | * |
| 10 | * Copyright(C) 2016 MediaTek Inc. |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of version 2 of the GNU General Public License as |
| 14 | * published by the Free Software Foundation. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, but |
| 17 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 19 | * See http://www.gnu.org/licenses/gpl-2.0.html for more details. |
| 20 | * |
| 21 | * BSD LICENSE |
| 22 | * |
| 23 | * Copyright(C) 2016 MediaTek Inc. All rights reserved. |
| 24 | * |
| 25 | * Redistribution and use in source and binary forms, with or without |
| 26 | * modification, are permitted provided that the following conditions |
| 27 | * are met: |
| 28 | * |
| 29 | * * Redistributions of source code must retain the above copyright |
| 30 | * notice, this list of conditions and the following disclaimer. |
| 31 | * * Redistributions in binary form must reproduce the above copyright |
| 32 | * notice, this list of conditions and the following disclaimer in |
| 33 | * the documentation and/or other materials provided with the |
| 34 | * distribution. |
| 35 | * * Neither the name of the copyright holder nor the names of its |
| 36 | * contributors may be used to endorse or promote products derived |
| 37 | * from this software without specific prior written permission. |
| 38 | * |
| 39 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 40 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 41 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 42 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 43 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 45 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 46 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 47 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 48 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 49 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | * |
| 51 | *****************************************************************************/ |
| 52 | /* |
| 53 | ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/p2p_typedef.h#1 |
| 54 | */ |
| 55 | |
| 56 | /*! \file p2p_typedef.h |
| 57 | * \brief Declaration of data type and return values of internal protocol stack. |
| 58 | * |
| 59 | * In this file we declare the data type and return values which will be exported |
| 60 | * to all MGMT Protocol Stack. |
| 61 | */ |
| 62 | |
| 63 | #ifndef _P2P_TYPEDEF_H |
| 64 | #define _P2P_TYPEDEF_H |
| 65 | |
| 66 | #if CFG_ENABLE_WIFI_DIRECT |
| 67 | |
| 68 | /******************************************************************************* |
| 69 | * C O M P I L E R F L A G S |
| 70 | ******************************************************************************** |
| 71 | */ |
| 72 | |
| 73 | /******************************************************************************* |
| 74 | * E X T E R N A L R E F E R E N C E S |
| 75 | ******************************************************************************** |
| 76 | */ |
| 77 | |
| 78 | /******************************************************************************* |
| 79 | * C O N S T A N T S |
| 80 | ******************************************************************************** |
| 81 | */ |
| 82 | |
| 83 | /******************************************************************************* |
| 84 | * D A T A T Y P E S |
| 85 | ******************************************************************************** |
| 86 | */ |
| 87 | |
| 88 | /* |
| 89 | * type definition of pointer to p2p structure |
| 90 | */ |
| 91 | /* typedef struct _GL_P2P_INFO_T GL_P2P_INFO_T, *P_GL_P2P_INFO_T; */ |
| 92 | typedef struct _P2P_INFO_T P2P_INFO_T, *P_P2P_INFO_T; |
| 93 | |
| 94 | typedef struct _P2P_FSM_INFO_T P2P_FSM_INFO_T, *P_P2P_FSM_INFO_T; |
| 95 | |
| 96 | typedef struct _P2P_DEV_FSM_INFO_T P2P_DEV_FSM_INFO_T, *P_P2P_DEV_FSM_INFO_T; |
| 97 | |
| 98 | typedef struct _P2P_ROLE_FSM_INFO_T P2P_ROLE_FSM_INFO_T, *P_P2P_ROLE_FSM_INFO_T; |
| 99 | |
| 100 | typedef struct _P2P_CONNECTION_SETTINGS_T P2P_CONNECTION_SETTINGS_T, *P_P2P_CONNECTION_SETTINGS_T; |
| 101 | |
| 102 | /* Type definition for function pointer to p2p function*/ |
| 103 | typedef BOOLEAN(*P2P_LAUNCH) (P_GLUE_INFO_T prGlueInfo); |
| 104 | |
| 105 | typedef BOOLEAN(*P2P_REMOVE) (P_GLUE_INFO_T prGlueInfo, BOOLEAN fgIsWlanLaunched); |
| 106 | |
| 107 | typedef BOOLEAN(*KAL_P2P_GET_CIPHER) (IN P_GLUE_INFO_T prGlueInfo); |
| 108 | |
| 109 | typedef BOOLEAN(*KAL_P2P_GET_TKIP_CIPHER) (IN P_GLUE_INFO_T prGlueInfo); |
| 110 | |
| 111 | typedef BOOLEAN(*KAL_P2P_GET_CCMP_CIPHER) (IN P_GLUE_INFO_T prGlueInfo); |
| 112 | |
| 113 | typedef BOOLEAN(*KAL_P2P_GET_WSC_MODE) (IN P_GLUE_INFO_T prGlueInfo); |
| 114 | |
| 115 | typedef struct net_device *(*KAL_P2P_GET_DEV_HDLR) (P_GLUE_INFO_T prGlueInfo); |
| 116 | |
| 117 | typedef VOID(*KAL_P2P_SET_MULTICAST_WORK_ITEM) (P_GLUE_INFO_T prGlueInfo); |
| 118 | |
| 119 | typedef VOID(*P2P_NET_REGISTER) (P_GLUE_INFO_T prGlueInfo); |
| 120 | |
| 121 | typedef VOID(*P2P_NET_UNREGISTER) (P_GLUE_INFO_T prGlueInfo); |
| 122 | |
| 123 | typedef VOID(*KAL_P2P_UPDATE_ASSOC_INFO) (IN P_GLUE_INFO_T prGlueInfo, |
| 124 | IN PUINT_8 pucFrameBody, |
| 125 | IN UINT_32 u4FrameBodyLen, IN BOOLEAN fgReassocRequest); |
| 126 | |
| 127 | typedef BOOLEAN(*P2P_VALIDATE_AUTH) (IN P_ADAPTER_T prAdapter, |
| 128 | IN P_SW_RFB_T prSwRfb, IN PP_STA_RECORD_T pprStaRec, OUT PUINT_16 pu2StatusCode); |
| 129 | |
| 130 | typedef BOOLEAN(*P2P_VALIDATE_ASSOC_REQ) (IN P_ADAPTER_T prAdapter, |
| 131 | IN P_SW_RFB_T prSwRfb, OUT PUINT_16 pu4ControlFlags); |
| 132 | |
| 133 | typedef VOID(*P2P_RUN_EVENT_AAA_TX_FAIL) (IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec); |
| 134 | |
| 135 | typedef BOOLEAN(*P2P_PARSE_CHECK_FOR_P2P_INFO_ELEM) (IN P_ADAPTER_T prAdapter, |
| 136 | IN PUINT_8 pucBuf, OUT PUINT_8 pucOuiType); |
| 137 | |
| 138 | typedef WLAN_STATUS(*P2P_RUN_EVENT_AAA_COMPLETE) (IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec); |
| 139 | |
| 140 | typedef VOID(*P2P_PROCESS_EVENT_UPDATE_NOA_PARAM) (IN P_ADAPTER_T prAdapter, |
| 141 | UINT_8 ucNetTypeIndex, |
| 142 | P_EVENT_UPDATE_NOA_PARAMS_T prEventUpdateNoaParam); |
| 143 | |
| 144 | typedef VOID(*SCAN_P2P_PROCESS_BEACON_AND_PROBE_RESP) (IN P_ADAPTER_T prAdapter, |
| 145 | IN P_SW_RFB_T prSwRfb, |
| 146 | IN P_WLAN_STATUS prStatus, |
| 147 | IN P_BSS_DESC_T prBssDesc, |
| 148 | IN P_WLAN_BEACON_FRAME_T prWlanBeaconFrame); |
| 149 | |
| 150 | typedef VOID(*P2P_RX_PUBLIC_ACTION_FRAME) (P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); |
| 151 | |
| 152 | typedef VOID(*RLM_RSP_GENERATE_OBSS_SCAN_IE) (P_ADAPTER_T prAdapter, P_MSDU_INFO_T prMsduInfo); |
| 153 | |
| 154 | typedef VOID(*RLM_UPDATE_BW_BY_CH_LIST_FOR_AP) (P_ADAPTER_T prAdapter, P_BSS_INFO_T prBssInfo); |
| 155 | |
| 156 | typedef VOID(*RLM_PROCESS_PUBLIC_ACTION) (P_ADAPTER_T prAdapter, P_SW_RFB_T prSwRfb); |
| 157 | |
| 158 | typedef VOID(*RLM_PROCESS_HT_ACTION) (P_ADAPTER_T prAdapter, P_SW_RFB_T prSwRfb); |
| 159 | |
| 160 | typedef VOID(*RLM_UPDATE_PARAMS_FOR_AP) (P_ADAPTER_T prAdapter, P_BSS_INFO_T prBssInfo, BOOLEAN fgUpdateBeacon); |
| 161 | |
| 162 | typedef VOID(*RLM_HANDLE_OBSS_STATUS_EVENT_PKT) (P_ADAPTER_T prAdapter, P_EVENT_AP_OBSS_STATUS_T prObssStatus); |
| 163 | |
| 164 | typedef BOOLEAN(*P2P_FUNC_VALIDATE_PROBE_REQ) (IN P_ADAPTER_T prAdapter, |
| 165 | IN P_SW_RFB_T prSwRfb, OUT PUINT_32 pu4ControlFlags); |
| 166 | |
| 167 | typedef VOID(*RLM_BSS_INIT_FOR_AP) (P_ADAPTER_T prAdapter, P_BSS_INFO_T prBssInfo); |
| 168 | |
| 169 | typedef UINT_32(*P2P_GET_PROB_RSP_IE_TABLE_SIZE) (VOID); |
| 170 | |
| 171 | typedef PUINT_8(*P2P_BUILD_REASSOC_REQ_FRAME_COMMON_IES) (IN P_ADAPTER_T prAdapter, |
| 172 | IN P_MSDU_INFO_T prMsduInfo, IN PUINT_8 pucBuffer); |
| 173 | |
| 174 | typedef VOID(*P2P_FUNC_DISCONNECT) (IN P_ADAPTER_T prAdapter, |
| 175 | IN P_STA_RECORD_T prStaRec, IN BOOLEAN fgSendDeauth, IN UINT_16 u2ReasonCode); |
| 176 | |
| 177 | typedef VOID(*P2P_FSM_RUN_EVENT_RX_DEAUTH) (IN P_ADAPTER_T prAdapter, |
| 178 | IN P_STA_RECORD_T prStaRec, IN P_SW_RFB_T prSwRfb); |
| 179 | |
| 180 | typedef VOID(*P2P_FSM_RUN_EVENT_RX_DISASSOC) (IN P_ADAPTER_T prAdapter, |
| 181 | IN P_STA_RECORD_T prStaRec, IN P_SW_RFB_T prSwRfb); |
| 182 | |
| 183 | typedef BOOLEAN(*P2P_FUN_IS_AP_MODE) (IN P_P2P_FSM_INFO_T prP2pFsmInfo); |
| 184 | |
| 185 | typedef VOID(*P2P_FSM_RUN_EVENT_BEACON_TIMEOUT) (IN P_ADAPTER_T prAdapter); |
| 186 | |
| 187 | typedef VOID(*P2P_FUNC_STORE_ASSOC_RSP_IE_BUFFER) (IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); |
| 188 | |
| 189 | typedef VOID(*P2P_GENERATE_P2P_IE) (IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo); |
| 190 | |
| 191 | typedef UINT_32(*P2P_CALCULATE_P2P_IE_LEN) (IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN P_STA_RECORD_T prStaRec); |
| 192 | |
| 193 | /******************************************************************************* |
| 194 | * P U B L I C D A T A |
| 195 | ******************************************************************************** |
| 196 | */ |
| 197 | |
| 198 | /******************************************************************************* |
| 199 | * P R I V A T E D A T A |
| 200 | ******************************************************************************** |
| 201 | */ |
| 202 | |
| 203 | /******************************************************************************* |
| 204 | * M A C R O S |
| 205 | ******************************************************************************** |
| 206 | */ |
| 207 | |
| 208 | /******************************************************************************* |
| 209 | * F U N C T I O N D E C L A R A T I O N S |
| 210 | ******************************************************************************** |
| 211 | */ |
| 212 | |
| 213 | /******************************************************************************* |
| 214 | * F U N C T I O N S |
| 215 | ******************************************************************************** |
| 216 | */ |
| 217 | #endif /*CFG_ENABLE_WIFI_DIRECT */ |
| 218 | |
| 219 | #endif /* _P2P_TYPEDEF_H */ |