Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 1 | /* |
Padma, Santhosh Kumar | 70380cf | 2016-01-11 18:42:20 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. |
Kiet Lam | c9a03d2 | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
Gopichand Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | c9a03d2 | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 28 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 29 | |
| 30 | /** ------------------------------------------------------------------------- * |
| 31 | ------------------------------------------------------------------------- * |
| 32 | |
| 33 | |
| 34 | \file oemDataApi.h |
| 35 | |
| 36 | Exports and types for the Common OEM DATA REQ/RSP Module interfaces. |
| 37 | |
| 38 | Copyright (C) 2010 Qualcomm Inc. |
| 39 | |
| 40 | |
| 41 | ========================================================================== */ |
| 42 | |
| 43 | #ifndef __OEM_DATA_API_H__ |
| 44 | #define __OEM_DATA_API_H__ |
| 45 | #include "sirApi.h" |
| 46 | #include "sirMacProtDef.h" |
| 47 | #include "csrLinkList.h" |
| 48 | |
| 49 | #ifndef OEM_DATA_REQ_SIZE |
Madan Mohan Koyyalamudi | 3fb3fd6 | 2012-12-04 17:21:36 -0800 | [diff] [blame] | 50 | #define OEM_DATA_REQ_SIZE 134 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 51 | #endif |
| 52 | |
| 53 | #ifndef OEM_DATA_RSP_SIZE |
Madan Mohan Koyyalamudi | 3fb3fd6 | 2012-12-04 17:21:36 -0800 | [diff] [blame] | 54 | #define OEM_DATA_RSP_SIZE 1968 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 55 | #endif |
| 56 | |
Padma, Santhosh Kumar | 2ccac21 | 2015-10-20 17:27:27 +0530 | [diff] [blame] | 57 | #ifndef NEW_OEM_DATA_REQ_SIZE |
| 58 | #define NEW_OEM_DATA_REQ_SIZE 292 |
| 59 | #endif |
| 60 | |
| 61 | #ifndef NEW_OEM_DATA_RSP_SIZE |
| 62 | #define NEW_OEM_DATA_RSP_SIZE 2100 |
| 63 | #endif |
| 64 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 65 | /************************************************************************************************************* |
| 66 | OEM DATA REQ/RSP - DATA STRUCTURES |
| 67 | *************************************************************************************************************/ |
| 68 | |
| 69 | /* Structure for defining req sent to the PE */ |
| 70 | typedef struct tagOemDataReq |
| 71 | { |
| 72 | tANI_U8 sessionId; |
| 73 | tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE]; |
| 74 | } tOemDataReq, tOemDataReqConfig; |
| 75 | |
| 76 | /************************************************************************************************************* |
| 77 | OEM DATA RESPONSE - DATA STRUCTURES |
| 78 | *************************************************************************************************************/ |
| 79 | typedef struct tagOemDataRsp |
| 80 | { |
| 81 | tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE]; |
| 82 | } tOemDataRsp; |
| 83 | |
| 84 | /*************************************************************************************************************/ |
| 85 | |
| 86 | typedef enum |
| 87 | { |
| 88 | eOEM_DATA_REQ_SUCCESS=1, |
| 89 | eOEM_DATA_REQ_FAILURE, |
| 90 | eOEM_DATA_REQ_INVALID_MODE, |
| 91 | } eOemDataReqStatus; |
| 92 | |
| 93 | /* --------------------------------------------------------------------------- |
| 94 | \fn oemData_OemDataReqOpen |
| 95 | \brief This function must be called before any API call to MEAS (OEM DATA REQ/RSP module) |
| 96 | \return eHalStatus |
| 97 | -------------------------------------------------------------------------------*/ |
| 98 | |
| 99 | eHalStatus oemData_OemDataReqOpen(tHalHandle hHal); |
| 100 | |
| 101 | /* --------------------------------------------------------------------------- |
| 102 | \fn oemData_OemDataReqClose |
| 103 | \brief This function must be called before closing the csr module |
| 104 | \return eHalStatus |
| 105 | -------------------------------------------------------------------------------*/ |
| 106 | |
| 107 | eHalStatus oemData_OemDataReqClose(tHalHandle hHal); |
| 108 | |
| 109 | /* HDD Callback function for the sme to callback when the oem data rsp is available */ |
| 110 | typedef eHalStatus (*oemData_OemDataReqCompleteCallback)( |
| 111 | tHalHandle, |
| 112 | void* p2, |
| 113 | tANI_U32 oemDataReqID, |
| 114 | eOemDataReqStatus status); |
| 115 | |
| 116 | /* --------------------------------------------------------------------------- |
| 117 | \fn oemData_OemDataReq |
| 118 | \brief Request an OEM DATA RSP |
| 119 | \param sessionId - Id of session to be used |
| 120 | \param pOemDataReqID - pointer to an object to get back the request ID |
| 121 | \param callback - a callback function that is called upon finish |
| 122 | \param pContext - a pointer passed in for the callback |
| 123 | \return eHalStatus |
| 124 | -------------------------------------------------------------------------------*/ |
| 125 | eHalStatus oemData_OemDataReq(tHalHandle, tANI_U8, tOemDataReqConfig *, tANI_U32 *pOemDataReqID, |
| 126 | oemData_OemDataReqCompleteCallback callback, void *pContext); |
| 127 | |
| 128 | /* --------------------------------------------------------------------------- |
| 129 | \fn sme_HandleOemDataRsp |
| 130 | \brief This function processes the oem data response obtained from the PE |
| 131 | \param pMsg - Pointer to the pSirSmeOemDataRsp |
| 132 | \return eHalStatus |
| 133 | -------------------------------------------------------------------------------*/ |
| 134 | eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8*); |
| 135 | |
| 136 | /* --------------------------------------------------------------------------- |
| 137 | \fn oemData_IsOemDataReqAllowed |
| 138 | \brief This function checks if oem data req/rsp can be performed in the |
| 139 | current driver state |
| 140 | \return eHalStatus |
| 141 | -------------------------------------------------------------------------------*/ |
| 142 | eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal); |
| 143 | |
Padma, Santhosh Kumar | 2ccac21 | 2015-10-20 17:27:27 +0530 | [diff] [blame] | 144 | |
| 145 | /* --------------------------------------------------------------------------- |
| 146 | OEM DATA REQ NEW - DATA STRUCTURES |
| 147 | -------------------------------------------------------------------------------*/ |
| 148 | /* Structure for defining req sent to the PE */ |
| 149 | typedef struct tagOemDataReqNew |
| 150 | { |
Padma, Santhosh Kumar | 70380cf | 2016-01-11 18:42:20 +0530 | [diff] [blame] | 151 | tSirMacAddr selfMacAddr; |
| 152 | tANI_U8 reserved[2]; |
Padma, Santhosh Kumar | 2ccac21 | 2015-10-20 17:27:27 +0530 | [diff] [blame] | 153 | tANI_U8 oemDataReqNew[NEW_OEM_DATA_REQ_SIZE]; |
| 154 | } tOemDataReqNew, tOemDataReqNewConfig; |
| 155 | |
| 156 | /* --------------------------------------------------------------------------- |
| 157 | OEM DATA RESPONSE - DATA STRUCTURES |
| 158 | -------------------------------------------------------------------------------*/ |
| 159 | typedef struct tagOemDataRspNew |
| 160 | { |
| 161 | tANI_U8 oemDataRspNew[NEW_OEM_DATA_RSP_SIZE]; |
| 162 | } tOemDataRspNew; |
| 163 | |
| 164 | /*************************************************************************************************************/ |
| 165 | |
| 166 | void send_oem_data_rsp_msg(int length, tANI_U8 *oemDataRsp); |
| 167 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 168 | #endif //_OEM_DATA_API_H__ |
| 169 | |
| 170 | #endif //FEATURE_OEM_DATA_SUPPORT |