blob: 2ae978b0b33c785387d98c09447fa1f6ede5b31a [file] [log] [blame]
Jeff Johnsone7245742012-09-05 17:12:55 -07001/*
Kiet Lamc9a03d22014-02-19 00:32:59 -08002 * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
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 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
57/*************************************************************************************************************
58 OEM DATA REQ/RSP - DATA STRUCTURES
59*************************************************************************************************************/
60
61/* Structure for defining req sent to the PE */
62typedef struct tagOemDataReq
63{
64 tANI_U8 sessionId;
65 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
66} tOemDataReq, tOemDataReqConfig;
67
68/*************************************************************************************************************
69 OEM DATA RESPONSE - DATA STRUCTURES
70*************************************************************************************************************/
71typedef struct tagOemDataRsp
72{
73 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
74} tOemDataRsp;
75
76/*************************************************************************************************************/
77
78typedef enum
79{
80 eOEM_DATA_REQ_SUCCESS=1,
81 eOEM_DATA_REQ_FAILURE,
82 eOEM_DATA_REQ_INVALID_MODE,
83} eOemDataReqStatus;
84
85/* ---------------------------------------------------------------------------
86 \fn oemData_OemDataReqOpen
87 \brief This function must be called before any API call to MEAS (OEM DATA REQ/RSP module)
88 \return eHalStatus
89 -------------------------------------------------------------------------------*/
90
91eHalStatus oemData_OemDataReqOpen(tHalHandle hHal);
92
93/* ---------------------------------------------------------------------------
94 \fn oemData_OemDataReqClose
95 \brief This function must be called before closing the csr module
96 \return eHalStatus
97 -------------------------------------------------------------------------------*/
98
99eHalStatus oemData_OemDataReqClose(tHalHandle hHal);
100
101/* HDD Callback function for the sme to callback when the oem data rsp is available */
102typedef eHalStatus (*oemData_OemDataReqCompleteCallback)(
103 tHalHandle,
104 void* p2,
105 tANI_U32 oemDataReqID,
106 eOemDataReqStatus status);
107
108/* ---------------------------------------------------------------------------
109 \fn oemData_OemDataReq
110 \brief Request an OEM DATA RSP
111 \param sessionId - Id of session to be used
112 \param pOemDataReqID - pointer to an object to get back the request ID
113 \param callback - a callback function that is called upon finish
114 \param pContext - a pointer passed in for the callback
115 \return eHalStatus
116 -------------------------------------------------------------------------------*/
117eHalStatus oemData_OemDataReq(tHalHandle, tANI_U8, tOemDataReqConfig *, tANI_U32 *pOemDataReqID,
118 oemData_OemDataReqCompleteCallback callback, void *pContext);
119
120/* ---------------------------------------------------------------------------
121 \fn sme_HandleOemDataRsp
122 \brief This function processes the oem data response obtained from the PE
123 \param pMsg - Pointer to the pSirSmeOemDataRsp
124 \return eHalStatus
125 -------------------------------------------------------------------------------*/
126eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8*);
127
128/* ---------------------------------------------------------------------------
129 \fn oemData_IsOemDataReqAllowed
130 \brief This function checks if oem data req/rsp can be performed in the
131 current driver state
132 \return eHalStatus
133 -------------------------------------------------------------------------------*/
134eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
135
136#endif //_OEM_DATA_API_H__
137
138#endif //FEATURE_OEM_DATA_SUPPORT