wlan_spectral_ucfg_api.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. *
  6. * Permission to use, copy, modify, and/or distribute this software for
  7. * any purpose with or without fee is hereby granted, provided that the
  8. * above copyright notice and this permission notice appear in all
  9. * copies.
  10. *
  11. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  12. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  13. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  14. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  15. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  16. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  17. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  18. * PERFORMANCE OF THIS SOFTWARE.
  19. */
  20. #ifndef _WLAN_SPECTRAL_UCFG_API_H_
  21. #define _WLAN_SPECTRAL_UCFG_API_H_
  22. #include <wlan_objmgr_cmn.h>
  23. #include <wlan_spectral_public_structs.h>
  24. /* Spectral specific UCFG set operations */
  25. /**
  26. * ucfg_spectral_control() - Carry out Spectral control operations
  27. * @pdev: Pointer to pdev
  28. * @sscan_req: spectral related control request
  29. *
  30. * Carry out Spectral specific UCFG control get/set operations
  31. *
  32. * Return: 0 on success, negative value on failure
  33. */
  34. QDF_STATUS ucfg_spectral_control(struct wlan_objmgr_pdev *pdev,
  35. struct spectral_cp_request *sscan_req);
  36. /**
  37. * ucfg_spectral_scan_set_ppid() - configure pid of spectral tool
  38. * @pdev: Pointer to pdev
  39. * @ppid: Spectral tool pid
  40. *
  41. * Configure pid of spectral tool
  42. *
  43. * Return: None
  44. */
  45. void ucfg_spectral_scan_set_ppid(struct wlan_objmgr_pdev *pdev,
  46. uint32_t ppid);
  47. /**
  48. * ucfg_spectral_create_cp_req() - Create Spectral control path request
  49. * @sscan_req: Pointer to Spectral scan request
  50. * @indata: pointer input data
  51. * @insize: Size of input data
  52. *
  53. * Create Spectral control path request structure
  54. *
  55. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
  56. */
  57. QDF_STATUS ucfg_spectral_create_cp_req(struct spectral_cp_request *sscan_req,
  58. void *indata, u_int32_t insize);
  59. /**
  60. * ucfg_spectral_extract_response() - Extract response from Spectral CP request
  61. * @sscan_req: Pointer to Spectral scan request
  62. * @outdata: pointer output data
  63. * @outsize: Size of output data
  64. *
  65. * Extract response from Spectral control path request
  66. *
  67. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
  68. */
  69. QDF_STATUS ucfg_spectral_extract_response(struct spectral_cp_request *sscan_req,
  70. void *outdata, u_int32_t *outsize);
  71. /**
  72. * ucfg_spectral_register_to_dbr() - Register spectral to DBR
  73. * @pdev: Pointer to pdev object
  74. *
  75. * Register spectral to Direct Buffer RX component
  76. *
  77. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
  78. */
  79. QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev);
  80. /**
  81. * ucfg_spectral_get_version() - ucfg API to get spectral version
  82. * @pdev: Pointer to pdev object
  83. * @version: Pointer to return version
  84. * @sub_version: Pointer to return sub version
  85. *
  86. * Since struct spectral_samp_msg may be modified, so provide API to get
  87. * version information and make sure spectraltool compatible with host.
  88. *
  89. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
  90. */
  91. QDF_STATUS ucfg_spectral_get_version(struct wlan_objmgr_pdev *pdev,
  92. uint32_t *version, uint32_t *sub_version);
  93. #endif /* _WLAN_SPECTRAL_UCFG_API_H_ */