Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: ISC */
0002 /*
0003  * Copyright (c) 2013-2015 Qualcomm Atheros, Inc.
0004  */
0005 
0006 #ifndef SPECTRAL_H
0007 #define SPECTRAL_H
0008 
0009 #include "../spectral_common.h"
0010 
0011 /**
0012  * struct ath10k_spec_scan - parameters for Atheros spectral scan
0013  *
0014  * @count: number of scan results requested for manual mode
0015  * @fft_size: number of bins to be requested = 2^(fft_size - bin_scale)
0016  */
0017 struct ath10k_spec_scan {
0018     u8 count;
0019     u8 fft_size;
0020 };
0021 
0022 /* enum ath10k_spectral_mode:
0023  *
0024  * @SPECTRAL_DISABLED: spectral mode is disabled
0025  * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with
0026  *  something else.
0027  * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples
0028  *  is performed manually.
0029  */
0030 enum ath10k_spectral_mode {
0031     SPECTRAL_DISABLED = 0,
0032     SPECTRAL_BACKGROUND,
0033     SPECTRAL_MANUAL,
0034 };
0035 
0036 #ifdef CONFIG_ATH10K_SPECTRAL
0037 
0038 int ath10k_spectral_process_fft(struct ath10k *ar,
0039                 struct wmi_phyerr_ev_arg *phyerr,
0040                 const struct phyerr_fft_report *fftr,
0041                 size_t bin_len, u64 tsf);
0042 int ath10k_spectral_start(struct ath10k *ar);
0043 int ath10k_spectral_vif_stop(struct ath10k_vif *arvif);
0044 int ath10k_spectral_create(struct ath10k *ar);
0045 void ath10k_spectral_destroy(struct ath10k *ar);
0046 
0047 #else
0048 
0049 static inline int
0050 ath10k_spectral_process_fft(struct ath10k *ar,
0051                 struct wmi_phyerr_ev_arg *phyerr,
0052                 const struct phyerr_fft_report *fftr,
0053                 size_t bin_len, u64 tsf)
0054 {
0055     return 0;
0056 }
0057 
0058 static inline int ath10k_spectral_start(struct ath10k *ar)
0059 {
0060     return 0;
0061 }
0062 
0063 static inline int ath10k_spectral_vif_stop(struct ath10k_vif *arvif)
0064 {
0065     return 0;
0066 }
0067 
0068 static inline int ath10k_spectral_create(struct ath10k *ar)
0069 {
0070     return 0;
0071 }
0072 
0073 static inline void ath10k_spectral_destroy(struct ath10k *ar)
0074 {
0075 }
0076 
0077 #endif /* CONFIG_ATH10K_SPECTRAL */
0078 
0079 #endif /* SPECTRAL_H */