blob: fa8dccc29d394fba219ad8768eaf5d1f1878fec5 [file] [log] [blame]
Jeff Johnsone7245742012-09-05 17:12:55 -07001/*
Padma, Santhosh Kumar70380cf2016-01-11 18:42:20 +05302 * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
Kiet Lamc9a03d22014-02-19 00:32:59 -08003 *
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 Nakkala9c070ad2013-01-08 21:16:34 -080020 */
Kiet Lamc9a03d22014-02-19 00:32:59 -080021
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 Johnsone7245742012-09-05 17:12:55 -070028#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 Koyyalamudi3fb3fd62012-12-04 17:21:36 -080050#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -070051#endif
52
53#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi3fb3fd62012-12-04 17:21:36 -080054#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -070055#endif
56
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +053057#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 Johnsone7245742012-09-05 17:12:55 -070065/*************************************************************************************************************
66 OEM DATA REQ/RSP - DATA STRUCTURES
67*************************************************************************************************************/
68
69/* Structure for defining req sent to the PE */
70typedef 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*************************************************************************************************************/
79typedef struct tagOemDataRsp
80{
81 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
82} tOemDataRsp;
83
84/*************************************************************************************************************/
85
86typedef 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
99eHalStatus 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
107eHalStatus oemData_OemDataReqClose(tHalHandle hHal);
108
109/* HDD Callback function for the sme to callback when the oem data rsp is available */
110typedef 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 -------------------------------------------------------------------------------*/
125eHalStatus 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 -------------------------------------------------------------------------------*/
134eHalStatus 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 -------------------------------------------------------------------------------*/
142eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
143
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530144
145/* ---------------------------------------------------------------------------
146 OEM DATA REQ NEW - DATA STRUCTURES
147 -------------------------------------------------------------------------------*/
148/* Structure for defining req sent to the PE */
149typedef struct tagOemDataReqNew
150{
Padma, Santhosh Kumar70380cf2016-01-11 18:42:20 +0530151 tSirMacAddr selfMacAddr;
152 tANI_U8 reserved[2];
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530153 tANI_U8 oemDataReqNew[NEW_OEM_DATA_REQ_SIZE];
154} tOemDataReqNew, tOemDataReqNewConfig;
155
156/* ---------------------------------------------------------------------------
157 OEM DATA RESPONSE - DATA STRUCTURES
158 -------------------------------------------------------------------------------*/
159typedef struct tagOemDataRspNew
160{
161 tANI_U8 oemDataRspNew[NEW_OEM_DATA_RSP_SIZE];
162} tOemDataRspNew;
163
164/*************************************************************************************************************/
165
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530166void send_oem_data_rsp_msg(tANI_U32 length, tANI_U8 *oemDataRsp);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530167
Jeff Johnsone7245742012-09-05 17:12:55 -0700168#endif //_OEM_DATA_API_H__
169
170#endif //FEATURE_OEM_DATA_SUPPORT