Lines Matching refs:spectral

16 #define ATH11K_SPECTRAL_MAX_IB_BINS(x)	((x)->hw_params.spectral.max_fft_bins >> 1)
183 if (ar->spectral.mode == ATH11K_SPECTRAL_DISABLED) in ath11k_spectral_scan_trigger()
215 ar->spectral.mode = mode; in ath11k_spectral_scan_config()
231 count = max_t(u16, 1, ar->spectral.count); in ath11k_spectral_scan_config()
235 param.scan_fft_size = ar->spectral.fft_size; in ath11k_spectral_scan_config()
272 spectral_mode = ar->spectral.mode; in ath11k_read_file_spec_scan_ctl()
309 if (ar->spectral.mode == ATH11K_SPECTRAL_MANUAL || in ath11k_write_file_spec_scan_ctl()
310 ar->spectral.mode == ATH11K_SPECTRAL_BACKGROUND) { in ath11k_write_file_spec_scan_ctl()
314 ret = ath11k_spectral_scan_config(ar, ar->spectral.mode); in ath11k_write_file_spec_scan_ctl()
366 spectral_count = ar->spectral.count; in ath11k_read_file_spectral_count()
394 ar->spectral.count = val; in ath11k_write_file_spectral_count()
419 fft_size = ar->spectral.fft_size; in ath11k_read_file_spectral_bins()
446 val > ar->ab->hw_params.spectral.max_fft_bins) in ath11k_write_file_spectral_bins()
453 ar->spectral.fft_size = ilog2(val); in ath11k_write_file_spectral_bins()
585 lockdep_assert_held(&ar->spectral.lock); in ath11k_spectral_process_fft()
587 if (!ab->hw_params.spectral.fft_sz) { in ath11k_spectral_process_fft()
597 bin_len = tlv_len - ab->hw_params.spectral.fft_hdr_len; in ath11k_spectral_process_fft()
605 bin_sz = ab->hw_params.spectral.fft_sz + ab->hw_params.spectral.fft_pad_sz; in ath11k_spectral_process_fft()
656 ab->hw_params.spectral.fft_sz); in ath11k_spectral_process_fft()
663 if (ar->spectral.rfs_scan) in ath11k_spectral_process_fft()
664 relay_write(ar->spectral.rfs_scan, fft_sample, in ath11k_spectral_process_fft()
685 spin_lock_bh(&ar->spectral.lock); in ath11k_spectral_process_data()
687 if (!ar->spectral.enabled) { in ath11k_spectral_process_data()
741 ab->hw_params.spectral.summary_pad_sz; in ath11k_spectral_process_data()
784 spin_unlock_bh(&ar->spectral.lock); in ath11k_spectral_process_data()
791 struct ath11k_spectral *sp = &ar->spectral; in ath11k_spectral_ring_alloc()
830 struct ath11k_spectral *sp = &ar->spectral; in ath11k_spectral_ring_free()
841 debugfs_remove(ar->spectral.scan_bins); in ath11k_spectral_debug_unregister()
842 ar->spectral.scan_bins = NULL; in ath11k_spectral_debug_unregister()
844 debugfs_remove(ar->spectral.scan_count); in ath11k_spectral_debug_unregister()
845 ar->spectral.scan_count = NULL; in ath11k_spectral_debug_unregister()
847 debugfs_remove(ar->spectral.scan_ctl); in ath11k_spectral_debug_unregister()
848 ar->spectral.scan_ctl = NULL; in ath11k_spectral_debug_unregister()
850 if (ar->spectral.rfs_scan) { in ath11k_spectral_debug_unregister()
851 relay_close(ar->spectral.rfs_scan); in ath11k_spectral_debug_unregister()
852 ar->spectral.rfs_scan = NULL; in ath11k_spectral_debug_unregister()
866 if (!ar->spectral.enabled) in ath11k_spectral_reset_buffer()
869 if (ar->spectral.rfs_scan) in ath11k_spectral_reset_buffer()
870 relay_reset(ar->spectral.rfs_scan); in ath11k_spectral_reset_buffer()
881 sp = &ar->spectral; in ath11k_spectral_deinit()
902 ar->spectral.rfs_scan = relay_open("spectral_scan", in ath11k_spectral_debug_register()
907 if (!ar->spectral.rfs_scan) { in ath11k_spectral_debug_register()
913 ar->spectral.scan_ctl = debugfs_create_file("spectral_scan_ctl", in ath11k_spectral_debug_register()
917 if (!ar->spectral.scan_ctl) { in ath11k_spectral_debug_register()
924 ar->spectral.scan_count = debugfs_create_file("spectral_count", in ath11k_spectral_debug_register()
928 if (!ar->spectral.scan_count) { in ath11k_spectral_debug_register()
935 ar->spectral.scan_bins = debugfs_create_file("spectral_bins", in ath11k_spectral_debug_register()
939 if (!ar->spectral.scan_bins) { in ath11k_spectral_debug_register()
965 if (!ab->hw_params.spectral.fft_sz) in ath11k_spectral_init()
970 sp = &ar->spectral; in ath11k_spectral_init()
1015 if (ar->spectral.enabled) in ath11k_spectral_get_mode()
1016 return ar->spectral.mode; in ath11k_spectral_get_mode()
1023 if (ar->spectral.enabled) in ath11k_spectral_get_dbring()
1024 return &ar->spectral.rx_ring; in ath11k_spectral_get_dbring()