spectral.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* SPDX-License-Identifier: ISC */
  2. /*
  3. * Copyright (c) 2013-2015 Qualcomm Atheros, Inc.
  4. */
  5. #ifndef SPECTRAL_H
  6. #define SPECTRAL_H
  7. #include "../spectral_common.h"
  8. /**
  9. * struct ath10k_spec_scan - parameters for Atheros spectral scan
  10. *
  11. * @count: number of scan results requested for manual mode
  12. * @fft_size: number of bins to be requested = 2^(fft_size - bin_scale)
  13. */
  14. struct ath10k_spec_scan {
  15. u8 count;
  16. u8 fft_size;
  17. };
  18. /* enum ath10k_spectral_mode:
  19. *
  20. * @SPECTRAL_DISABLED: spectral mode is disabled
  21. * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with
  22. * something else.
  23. * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples
  24. * is performed manually.
  25. */
  26. enum ath10k_spectral_mode {
  27. SPECTRAL_DISABLED = 0,
  28. SPECTRAL_BACKGROUND,
  29. SPECTRAL_MANUAL,
  30. };
  31. #ifdef CONFIG_ATH10K_SPECTRAL
  32. int ath10k_spectral_process_fft(struct ath10k *ar,
  33. struct wmi_phyerr_ev_arg *phyerr,
  34. const struct phyerr_fft_report *fftr,
  35. size_t bin_len, u64 tsf);
  36. int ath10k_spectral_start(struct ath10k *ar);
  37. int ath10k_spectral_vif_stop(struct ath10k_vif *arvif);
  38. int ath10k_spectral_create(struct ath10k *ar);
  39. void ath10k_spectral_destroy(struct ath10k *ar);
  40. #else
  41. static inline int
  42. ath10k_spectral_process_fft(struct ath10k *ar,
  43. struct wmi_phyerr_ev_arg *phyerr,
  44. const struct phyerr_fft_report *fftr,
  45. size_t bin_len, u64 tsf)
  46. {
  47. return 0;
  48. }
  49. static inline int ath10k_spectral_start(struct ath10k *ar)
  50. {
  51. return 0;
  52. }
  53. static inline int ath10k_spectral_vif_stop(struct ath10k_vif *arvif)
  54. {
  55. return 0;
  56. }
  57. static inline int ath10k_spectral_create(struct ath10k *ar)
  58. {
  59. return 0;
  60. }
  61. static inline void ath10k_spectral_destroy(struct ath10k *ar)
  62. {
  63. }
  64. #endif /* CONFIG_ATH10K_SPECTRAL */
  65. #endif /* SPECTRAL_H */