Satyanarayana Dash | 4ad2ae0 | 2015-04-09 22:25:05 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014-2015 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. |
| 20 | */ |
| 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 | |
| 28 | /****************************************************************************** |
| 29 | * |
| 30 | * Name: nan_Api.h |
| 31 | * |
| 32 | * Description: NAN FSM defines. |
| 33 | * |
| 34 | ******************************************************************************/ |
| 35 | |
| 36 | #ifndef __NAN_API_H__ |
| 37 | #define __NAN_API_H__ |
| 38 | |
| 39 | #include "vos_types.h" |
| 40 | #include "halTypes.h" |
| 41 | |
| 42 | typedef struct sNanRequestReq |
| 43 | { |
| 44 | tANI_U16 request_data_len; |
| 45 | const tANI_U8* request_data; |
| 46 | } tNanRequestReq, *tpNanRequestReq; |
| 47 | |
| 48 | /****************************************************************************** |
| 49 | * Function: Pointer NanCallback |
| 50 | * |
| 51 | * Description: |
| 52 | * this function pointer is used hold nan response callback. When ever driver |
| 53 | * receives nan response, this callback will be used. |
| 54 | * |
| 55 | * Args: |
| 56 | * first argument to pass hHal pointer and second argument |
| 57 | * to pass the nan response data. |
| 58 | * |
| 59 | * Returns: |
| 60 | * void |
| 61 | ******************************************************************************/ |
| 62 | typedef void (*NanCallback)(void*, tSirNanEvent*); |
| 63 | |
| 64 | /****************************************************************************** |
| 65 | * Function: sme_NanRegisterCallback |
| 66 | * |
| 67 | * Description: |
| 68 | * This function gets called when HDD wants register nan rsp callback with |
| 69 | * sme layer. |
| 70 | * |
| 71 | * Args: |
| 72 | * hHal and callback which needs to be registered. |
| 73 | * |
| 74 | * Returns: |
| 75 | * void |
| 76 | ******************************************************************************/ |
| 77 | void sme_NanRegisterCallback(tHalHandle hHal, NanCallback callback); |
| 78 | |
| 79 | /****************************************************************************** |
| 80 | * Function: sme_NanRequest |
| 81 | * |
| 82 | * Description: |
| 83 | * This function gets called when HDD receives NAN vendor command |
| 84 | * from userspace |
| 85 | * |
| 86 | * Args: |
| 87 | * hHal, Nan Request structure ptr and sessionId |
| 88 | * |
| 89 | * Returns: |
| 90 | * VOS_STATUS |
| 91 | ******************************************************************************/ |
| 92 | VOS_STATUS sme_NanRequest(tHalHandle hHalHandle, tpNanRequestReq input, |
| 93 | tANI_U32 sessionId); |
| 94 | |
| 95 | /****************************************************************************** |
| 96 | \fn sme_NanEvent |
| 97 | |
| 98 | \brief |
| 99 | a callback function called when SME received eWNI_SME_NAN_EVENT |
| 100 | event from WDA |
| 101 | |
| 102 | \param hHal - HAL handle for device |
| 103 | \param pMsg - Message body passed from WDA; includes NAN header |
| 104 | |
| 105 | \return VOS_STATUS |
| 106 | ******************************************************************************/ |
| 107 | VOS_STATUS sme_NanEvent(tHalHandle hHal, void* pMsg); |
| 108 | |
| 109 | #endif /* __NAN_API_H__ */ |