wmi_unified_nan_api.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: Implement API's specific to NAN component.
  20. */
  21. #ifndef _WMI_UNIFIED_NAN_API_H_
  22. #define _WMI_UNIFIED_NAN_API_H_
  23. #include <nan_public_structs.h>
  24. /**
  25. * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW
  26. * @wmi_hdl: wmi handle
  27. * @req: pointer to request buffer
  28. *
  29. * Return: status of operation
  30. */
  31. QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
  32. struct nan_datapath_initiator_req *req);
  33. /**
  34. * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW
  35. * @wmi_hdl: wmi handle
  36. * @req: pointer to request buffer
  37. *
  38. * Return: status of operation
  39. */
  40. QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
  41. struct nan_datapath_responder_req *req);
  42. /**
  43. * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW
  44. * @wmi_hdl: wmi handle
  45. * @req: pointer to request buffer
  46. *
  47. * Return: status of operation
  48. */
  49. QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
  50. struct nan_datapath_end_req *req);
  51. /**
  52. * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer
  53. * @wmi_hdl: wmi handle
  54. * @data: event buffer
  55. * @rsp: buffer to populate
  56. *
  57. * Return: status of operation
  58. */
  59. QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
  60. uint8_t *data, struct nan_datapath_initiator_rsp *rsp);
  61. /**
  62. * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer
  63. * @wmi_hdl: wmi handle
  64. * @data: event buffer
  65. * @ind: buffer to populate
  66. *
  67. * Return: status of operation
  68. */
  69. QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
  70. struct nan_datapath_indication_event *ind);
  71. /**
  72. * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer
  73. * @wmi_hdl: wmi handle
  74. * @data: event buffer
  75. * @ev: buffer to populate
  76. *
  77. * Return: status of operation
  78. */
  79. QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
  80. struct nan_datapath_confirm_event *ev);
  81. /**
  82. * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer
  83. * @wmi_hdl: wmi handle
  84. * @data: event buffer
  85. * @rsp: buffer to populate
  86. *
  87. * Return: status of operation
  88. */
  89. QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
  90. uint8_t *data, struct nan_datapath_responder_rsp *rsp);
  91. /**
  92. * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer
  93. * @wmi_hdl: wmi handle
  94. * @data: event buffer
  95. * @rsp: buffer to populate
  96. *
  97. * Return: status of operation
  98. */
  99. QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
  100. struct nan_datapath_end_rsp_event *rsp);
  101. /**
  102. * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer
  103. * @wmi_hdl: wmi handle
  104. * @data: event buffer
  105. * @ind: buffer to populate
  106. *
  107. * Return: status of operation
  108. */
  109. QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
  110. struct nan_datapath_end_indication_event **ind);
  111. /**
  112. * wmi_extract_ndp_sch_update - api to extract ndp sch update from event buffer
  113. * @wmi_hdl: wmi handle
  114. * @data: event buffer
  115. * @ind: buffer to populate
  116. *
  117. * Return: status of operation
  118. */
  119. QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
  120. struct nan_datapath_sch_update_event *ind);
  121. #endif /* _WMI_UNIFIED_NAN_API_H_ */