wmi_unified_p2p_api.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 P2P component.
  20. */
  21. #ifndef _WMI_UNIFIED_P2P_API_H_
  22. #define _WMI_UNIFIED_P2P_API_H_
  23. #include <wlan_p2p_public_struct.h>
  24. /**
  25. * wmi_unified_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
  26. * @wmi_hdl: wmi handle
  27. * @opps: p2p opp power save parameters
  28. *
  29. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  30. */
  31. QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
  32. struct p2p_ps_params *oppps);
  33. /**
  34. * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
  35. * @wmi_hdl: wmi handle
  36. * @noa: p2p power save parameters
  37. *
  38. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  39. */
  40. QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
  41. struct p2p_ps_params *noa);
  42. /**
  43. * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
  44. * @wmi_handle: wmi handle
  45. * @evt_buf: pointer to event buffer
  46. * @param: Pointer to hold p2p noa param
  47. *
  48. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  49. */
  50. QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl,
  51. void *evt_buf,
  52. struct p2p_noa_info *param);
  53. /**
  54. * wmi_send_set_mac_addr_rx_filter_cmd() - set mac addr rx filter cmd
  55. * @wmi_hdl: wmi handle
  56. * @param: Pointer to set mac filter struct
  57. *
  58. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  59. */
  60. QDF_STATUS
  61. wmi_send_set_mac_addr_rx_filter_cmd(void *wmi_hdl,
  62. struct p2p_set_mac_filter *param);
  63. /**
  64. * wmi_extract_mac_addr_rx_filter_evt_param() - extract mac addr rx filter evt
  65. * @wmi_hdl: wmi handle
  66. * @evt_buf: pointer to event buffer
  67. * @param: Pointer to extracted evt info
  68. *
  69. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  70. */
  71. QDF_STATUS
  72. wmi_extract_mac_addr_rx_filter_evt_param(void *wmi_hdl, void *evt_buf,
  73. struct p2p_set_mac_filter_evt *param);
  74. #ifdef FEATURE_P2P_LISTEN_OFFLOAD
  75. /**
  76. * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
  77. * @wmi_hdl: wmi handle
  78. * @param: p2p listen offload start parameters
  79. *
  80. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  81. */
  82. QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
  83. struct p2p_lo_start *param);
  84. /**
  85. * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
  86. * @wmi_hdl: wmi handle
  87. * @vdev_id: vdev id
  88. *
  89. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  90. */
  91. QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
  92. /**
  93. * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
  94. * @wmi_handle: wmi handle
  95. * @evt_buf: pointer to event buffer
  96. * @param: Pointer to hold listen offload stop param
  97. *
  98. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  99. */
  100. QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl,
  101. void *evt_buf,
  102. struct p2p_lo_event *param);
  103. #endif /* FEATURE_P2P_LISTEN_OFFLOAD */
  104. #endif /* _WMI_UNIFIED_P2P_API_H_ */