target_if_spectral_sim.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * Copyright (c) 2015,2017-2020 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. #ifndef _SPECTRAL_SIM_H_
  20. #define _SPECTRAL_SIM_H_
  21. #ifdef QCA_SUPPORT_SPECTRAL_SIMULATION
  22. #include "target_if_spectral.h"
  23. /**
  24. * target_if_spectral_sim_attach() - Initialize Spectral Simulation
  25. * functionality
  26. * @spectral: pointer to spectral internal data structure
  27. *
  28. * Setup data structures to be used for serving out data corresponding to
  29. * various bandwidths and configurations.
  30. *
  31. * Return: Integer status value. 0:Success, -1:Failure
  32. */
  33. int target_if_spectral_sim_attach(struct target_if_spectral *spectral);
  34. /**
  35. * target_if_spectral_sim_detach() - De-initialize Spectral Simulation
  36. * functionality
  37. * @spectral: pointer to spectral internal data structure
  38. *
  39. * Free up data structures used for serving out data corresponding to various
  40. * bandwidths and configurations.
  41. *
  42. * Return: None
  43. */
  44. void target_if_spectral_sim_detach(struct target_if_spectral *spectral);
  45. /**
  46. * target_if_spectral_sops_sim_is_active() - Check if Spectral(simulated) is
  47. * active
  48. * @arg: pointer to spectral internal data structure
  49. *
  50. * Check if Spectral (simulated) is active
  51. *
  52. * Return: Integer status value. 0: Not active, 1: Active
  53. */
  54. uint32_t target_if_spectral_sops_sim_is_active(void *arg);
  55. /**
  56. * target_if_spectral_sops_sim_is_enabled() - Check if Spectral(simulated) is
  57. * enabled
  58. * @arg: pointer to spectral internal data structure
  59. *
  60. * Check if Spectral(simulated) is enabled
  61. *
  62. * Return: Integer status value. 0: Not enabled, 1: Enabled
  63. */
  64. uint32_t target_if_spectral_sops_sim_is_enabled(void *arg);
  65. /**
  66. * target_if_spectral_sops_sim_start_scan() - Start Spectral simulation
  67. * @arg: pointer to spectral internal data structure
  68. *
  69. * Start Spectral simulation
  70. *
  71. * Return: Integer status value. 0: Failure, 1: Success
  72. */
  73. uint32_t target_if_spectral_sops_sim_start_scan(void *arg);
  74. /**
  75. * target_if_spectral_sops_sim_stop_scan() - Stop Spectral simulation
  76. * @arg: pointer to spectral internal data structure
  77. *
  78. * Stop Spectral simulation
  79. *
  80. * Return: Integer status value. 0: Failure, 1: Success
  81. */
  82. uint32_t target_if_spectral_sops_sim_stop_scan(void *arg);
  83. /**
  84. * target_if_spectral_sops_sim_configure_params() - Configure Spectral
  85. * parameters into simulation
  86. * @arg: pointer to ath_spectral structure
  87. * @params: pointer to struct spectral_config structure bearing Spectral
  88. * configuration
  89. * @smode: Spectral scan mode
  90. *
  91. * Internally, this function actually searches if a record set with the desired
  92. * configuration has been loaded. If so, it points to the record set for
  93. * later usage when the simulation is started. If not, it returns an error.
  94. *
  95. * Return: Integer status value. 0: Failure, 1: Success
  96. */
  97. uint32_t target_if_spectral_sops_sim_configure_params(
  98. void *arg,
  99. struct spectral_config *params,
  100. enum spectral_scan_mode smode);
  101. /**
  102. * target_if_spectral_sops_sim_get_params() - Get Spectral parameters configured
  103. * into simulation
  104. * @arg: pointer to ath_spectral structure
  105. * @params: pointer to struct spectral_config structure which should be
  106. * populated with Spectral configuration
  107. *
  108. * Get Spectral parameters configured into simulation
  109. *
  110. * Return: Integer status value. 0: Failure, 1: Success
  111. */
  112. uint32_t target_if_spectral_sops_sim_get_params(
  113. void *arg,
  114. struct spectral_config *params);
  115. #endif /* QCA_SUPPORT_SPECTRAL_SIMULATION */
  116. #endif /* _SPECTRAL_SIM_H_ */