target_if_scan.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: offload lmac interface APIs for scan
  21. */
  22. #ifndef __TARGET_SCAN_IF_H__
  23. #define __TARGET_SCAN_IF_H__
  24. #include <wmi_unified_api.h>
  25. struct scan_req_params;
  26. struct scan_cancel_param;
  27. struct wlan_objmgr_psoc;
  28. #define WLAN_MAX_ACTIVE_SCANS_ALLOWED 8
  29. #ifdef FEATURE_WLAN_SCAN_PNO
  30. /**
  31. * target_if_nlo_match_event_handler() - nlo match event handler
  32. * @scn: scn handle
  33. * @data: event data
  34. * @len: data length
  35. *
  36. * Record NLO match event comes from FW. It's a indication that
  37. * one of the profile is matched.
  38. *
  39. * Return: 0 for success or error code.
  40. */
  41. int target_if_nlo_match_event_handler(ol_scn_t scn, uint8_t *data,
  42. uint32_t len);
  43. /**
  44. * target_if_nlo_complete_handler() - nlo complete event handler
  45. * @scn: scn handle
  46. * @data: event data
  47. * @len: data length
  48. *
  49. * Record NLO match event comes from FW. It's a indication that
  50. * one of the profile is matched.
  51. *
  52. * Return: 0 for success or error code.
  53. */
  54. int target_if_nlo_complete_handler(ol_scn_t scn, uint8_t *data,
  55. uint32_t len);
  56. #endif
  57. /**
  58. * target_if_scan_register_event_handler() - lmac handler API
  59. * to register for scan events
  60. * @psoc: psoc object
  61. * @arg: argument to lmac
  62. *
  63. * Return: QDF_STATUS
  64. */
  65. QDF_STATUS
  66. target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc,
  67. void *arg);
  68. /**
  69. * target_if_scan_unregister_event_handler() - lmac handler API
  70. * to unregister for scan events
  71. * @psoc: psoc object
  72. * @arg: argument to lmac
  73. *
  74. * Return: QDF_STATUS
  75. */
  76. QDF_STATUS
  77. target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc,
  78. void *arg);
  79. /**
  80. * target_if_scan_start() - lmac handler API to start scan
  81. * @pdev: pdev object
  82. * @req: scan_req_params object
  83. *
  84. * Return: QDF_STATUS
  85. */
  86. QDF_STATUS
  87. target_if_scan_start(struct wlan_objmgr_pdev *pdev,
  88. struct scan_start_request *req);
  89. /**
  90. * target_if_scan_cancel() - lmac handler API to cancel a previous active scan
  91. * @pdev: pdev object
  92. * @req: scan_cancel_param object
  93. *
  94. * Return: QDF_STATUS
  95. */
  96. QDF_STATUS
  97. target_if_scan_cancel(struct wlan_objmgr_pdev *pdev,
  98. struct scan_cancel_param *req);
  99. /**
  100. * target_if_scan_tx_ops_register() - lmac handler to register scan tx_ops
  101. * callback functions
  102. * @tx_ops: wlan_lmac_if_tx_ops object
  103. *
  104. * Return: QDF_STATUS
  105. */
  106. QDF_STATUS
  107. target_if_scan_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops);
  108. /**
  109. * target_if_scan_set_max_active_scans() - lmac handler to set max active scans
  110. * @psoc: psoc object
  111. * @max_active_scans: maximum active scans allowed on underlying psoc
  112. *
  113. * Return: QDF_STATUS
  114. */
  115. QDF_STATUS
  116. target_if_scan_set_max_active_scans(struct wlan_objmgr_psoc *psoc,
  117. uint32_t max_active_scans);
  118. /**
  119. * target_if_update_aux_support() - update aux mac support in scan
  120. * object via service bit from FW
  121. * @psoc: psoc object
  122. *
  123. * This function updates aux mac support bit in scan object via service bit
  124. * from FW.
  125. *
  126. */
  127. QDF_STATUS target_if_update_aux_support(struct wlan_objmgr_psoc *psoc);
  128. #endif