blob: d8d0971aea4b6fa07a0b12016e2fbaefd93a3998 [file] [log] [blame]
Jeff Johnsone7245742012-09-05 17:12:55 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnsone7245742012-09-05 17:12:55 -07003 *
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.
20 */
21
22#ifdef FEATURE_OEM_DATA_SUPPORT
23
24/** ------------------------------------------------------------------------- *
25 ------------------------------------------------------------------------- *
26
27
28 \file oemDataApi.h
29
30 Exports and types for the Common OEM DATA REQ/RSP Module interfaces.
31
32 Copyright (C) 2010 Qualcomm Inc.
33
34
35 ========================================================================== */
36
37#ifndef __OEM_DATA_API_H__
38#define __OEM_DATA_API_H__
39#include "sirApi.h"
40#include "sirMacProtDef.h"
41#include "csrLinkList.h"
42
43#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi3fb3fd62012-12-04 17:21:36 -080044#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -070045#endif
46
47#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi3fb3fd62012-12-04 17:21:36 -080048#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -070049#endif
50
51/*************************************************************************************************************
52 OEM DATA REQ/RSP - DATA STRUCTURES
53*************************************************************************************************************/
54
55/* Structure for defining req sent to the PE */
56typedef struct tagOemDataReq
57{
58 tANI_U8 sessionId;
59 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
60} tOemDataReq, tOemDataReqConfig;
61
62/*************************************************************************************************************
63 OEM DATA RESPONSE - DATA STRUCTURES
64*************************************************************************************************************/
65typedef struct tagOemDataRsp
66{
67 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
68} tOemDataRsp;
69
70/*************************************************************************************************************/
71
72typedef enum
73{
74 eOEM_DATA_REQ_SUCCESS=1,
75 eOEM_DATA_REQ_FAILURE,
76 eOEM_DATA_REQ_INVALID_MODE,
77} eOemDataReqStatus;
78
79/* ---------------------------------------------------------------------------
80 \fn oemData_OemDataReqOpen
81 \brief This function must be called before any API call to MEAS (OEM DATA REQ/RSP module)
82 \return eHalStatus
83 -------------------------------------------------------------------------------*/
84
85eHalStatus oemData_OemDataReqOpen(tHalHandle hHal);
86
87/* ---------------------------------------------------------------------------
88 \fn oemData_OemDataReqClose
89 \brief This function must be called before closing the csr module
90 \return eHalStatus
91 -------------------------------------------------------------------------------*/
92
93eHalStatus oemData_OemDataReqClose(tHalHandle hHal);
94
95/* HDD Callback function for the sme to callback when the oem data rsp is available */
96typedef eHalStatus (*oemData_OemDataReqCompleteCallback)(
97 tHalHandle,
98 void* p2,
99 tANI_U32 oemDataReqID,
100 eOemDataReqStatus status);
101
102/* ---------------------------------------------------------------------------
103 \fn oemData_OemDataReq
104 \brief Request an OEM DATA RSP
105 \param sessionId - Id of session to be used
106 \param pOemDataReqID - pointer to an object to get back the request ID
107 \param callback - a callback function that is called upon finish
108 \param pContext - a pointer passed in for the callback
109 \return eHalStatus
110 -------------------------------------------------------------------------------*/
111eHalStatus oemData_OemDataReq(tHalHandle, tANI_U8, tOemDataReqConfig *, tANI_U32 *pOemDataReqID,
112 oemData_OemDataReqCompleteCallback callback, void *pContext);
113
114/* ---------------------------------------------------------------------------
115 \fn sme_HandleOemDataRsp
116 \brief This function processes the oem data response obtained from the PE
117 \param pMsg - Pointer to the pSirSmeOemDataRsp
118 \return eHalStatus
119 -------------------------------------------------------------------------------*/
120eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8*);
121
122/* ---------------------------------------------------------------------------
123 \fn oemData_IsOemDataReqAllowed
124 \brief This function checks if oem data req/rsp can be performed in the
125 current driver state
126 \return eHalStatus
127 -------------------------------------------------------------------------------*/
128eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
129
130#endif //_OEM_DATA_API_H__
131
132#endif //FEATURE_OEM_DATA_SUPPORT