target_if_nan.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2017-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: contains nan target if declarations
  20. */
  21. #ifndef _WLAN_NAN_TGT_IF_H_
  22. #define _WLAN_NAN_TGT_IF_H_
  23. #include "qdf_types.h"
  24. #include <qdf_mem.h>
  25. #include <qdf_status.h>
  26. #include <wmi_unified_api.h>
  27. #include <wmi_unified_priv.h>
  28. #include <wmi_unified_param.h>
  29. #include <wlan_objmgr_psoc_obj.h>
  30. #include <wlan_scan_tgt_api.h>
  31. #include <target_if.h>
  32. #include "nan_public_structs.h"
  33. struct wlan_objmgr_psoc;
  34. /**
  35. * target_if_nan_get_tx_ops() - retrieve the nan tx_ops
  36. * @psoc: psoc context
  37. *
  38. * API to retrieve the nan tx_ops from the psoc context
  39. *
  40. * Return: nan tx_ops pointer
  41. */
  42. struct wlan_nan_tx_ops *target_if_nan_get_tx_ops(struct wlan_objmgr_psoc *psoc);
  43. /**
  44. * target_if_nan_get_rx_ops() - retrieve the nan rx_ops
  45. * @psoc: psoc context
  46. *
  47. * API to retrieve the nan rx_ops from the psoc context
  48. *
  49. * Return: nan rx_ops pointer
  50. */
  51. struct wlan_nan_rx_ops *target_if_nan_get_rx_ops(struct wlan_objmgr_psoc *psoc);
  52. /**
  53. * target_if_nan_register_tx_ops() - registers nan tx ops
  54. * @tx_ops: tx ops
  55. *
  56. * Return: none
  57. */
  58. void target_if_nan_register_tx_ops(struct wlan_nan_tx_ops *tx_ops);
  59. /**
  60. * target_if_nan_register_rx_ops() - registers nan rx ops
  61. * @tx_ops: rx ops
  62. *
  63. * Return: none
  64. */
  65. void target_if_nan_register_rx_ops(struct wlan_nan_rx_ops *rx_ops);
  66. /**
  67. * target_if_nan_register_events() - registers with NDP events
  68. * @psoc: pointer to psoc object
  69. *
  70. * Return: status of operation
  71. */
  72. QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc);
  73. /**
  74. * target_if_nan_deregister_events() - registers nan rx ops
  75. * @psoc: pointer to psoc object
  76. *
  77. * Return: status of operation
  78. */
  79. QDF_STATUS target_if_nan_deregister_events(struct wlan_objmgr_psoc *psoc);
  80. /**
  81. * target_if_nan_rsp_handler() - Target IF handler for NAN Discovery events
  82. * @scn: target handle
  83. * @data: event buffer
  84. * @len: event buffer length
  85. *
  86. * Return: 0 for success or error code
  87. */
  88. int target_if_nan_rsp_handler(ol_scn_t scn, uint8_t *data, uint32_t len);
  89. #endif /* _WIFI_POS_TGT_IF_H_ */