target_if_scan.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Copyright (c) 2017 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: offload lmac interface APIs for scan
  20. */
  21. #ifndef __TARGET_SCAN_IF_H__
  22. #define __TARGET_SCAN_IF_H__
  23. #include <wmi_unified_api.h>
  24. struct scan_req_params;
  25. struct scan_cancel_param;
  26. struct wlan_objmgr_psoc;
  27. #define WLAN_MAX_ACTIVE_SCANS_ALLOWED 8
  28. #ifdef FEATURE_WLAN_SCAN_PNO
  29. /**
  30. * target_if_nlo_match_event_handler() - nlo match event handler
  31. * @scn: scn handle
  32. * @event: event data
  33. * @len: data length
  34. *
  35. * Record NLO match event comes from FW. It's a indication that
  36. * one of the profile is matched.
  37. *
  38. * Return: 0 for success or error code.
  39. */
  40. int target_if_nlo_match_event_handler(ol_scn_t scn, uint8_t *data,
  41. uint32_t len);
  42. /**
  43. * target_if_nlo_complete_handler() - nlo complete event handler
  44. * @scn: scn handle
  45. * @event: event data
  46. * @len: data length
  47. *
  48. * Record NLO match event comes from FW. It's a indication that
  49. * one of the profile is matched.
  50. *
  51. * Return: 0 for success or error code.
  52. */
  53. int target_if_nlo_complete_handler(ol_scn_t scn, uint8_t *data,
  54. uint32_t len);
  55. #endif
  56. /**
  57. * target_if_scan_register_event_handler() - lmac handler API
  58. * to register for scan events
  59. * @psoc: psoc object
  60. * @arg: argument to lmac
  61. *
  62. * Return: QDF_STATUS
  63. */
  64. QDF_STATUS
  65. target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc,
  66. void *arg);
  67. /**
  68. * target_if_scan_unregister_event_handler() - lmac handler API
  69. * to unregister for scan events
  70. * @psoc: psoc object
  71. * @arg: argument to lmac
  72. *
  73. * Return: QDF_STATUS
  74. */
  75. QDF_STATUS
  76. target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc,
  77. void *arg);
  78. /**
  79. * target_if_scan_start() - lmac handler API to start scan
  80. * @psoc: psoc object
  81. * @req: scan_req_params object
  82. *
  83. * Return: QDF_STATUS
  84. */
  85. QDF_STATUS
  86. target_if_scan_start(struct wlan_objmgr_psoc *psoc,
  87. struct scan_start_request *req);
  88. /**
  89. * target_if_scan_cancel() - lmac handler API to cancel a previous active scan
  90. * @psoc: psoc object
  91. * @req: scan_cancel_param object
  92. *
  93. * Return: QDF_STATUS
  94. */
  95. QDF_STATUS
  96. target_if_scan_cancel(struct wlan_objmgr_psoc *psoc,
  97. struct scan_cancel_param *req);
  98. /**
  99. * target_if_register_scan_tx_ops() - lmac handler to register scan tx_ops
  100. * callback functions
  101. * @scan: wlan_lmac_if_scan_tx_ops object
  102. *
  103. * Return: QDF_STATUS
  104. */
  105. QDF_STATUS
  106. target_if_register_scan_tx_ops(struct wlan_lmac_if_scan_tx_ops *scan);
  107. /**
  108. * target_if_scan_set_max_active_scans() - lmac handler to set max active scans
  109. * @psoc: psoc object
  110. * @max_active_scans: maximum active scans allowed on underlying psoc
  111. *
  112. * Return: QDF_STATUS
  113. */
  114. QDF_STATUS
  115. target_if_scan_set_max_active_scans(struct wlan_objmgr_psoc *psoc,
  116. uint32_t max_active_scans);
  117. #endif