Lines Matching refs:spectral

16 #define ATH11K_SPECTRAL_MAX_IB_BINS(x)	((x)->hw_params.spectral.max_fft_bins >> 1)
184 if (ar->spectral.mode == ATH11K_SPECTRAL_DISABLED) in ath11k_spectral_scan_trigger()
187 ar->spectral.is_primary = true; in ath11k_spectral_scan_trigger()
219 spin_lock_bh(&ar->spectral.lock); in ath11k_spectral_scan_config()
220 ar->spectral.mode = mode; in ath11k_spectral_scan_config()
221 spin_unlock_bh(&ar->spectral.lock); in ath11k_spectral_scan_config()
237 count = max_t(u16, 1, ar->spectral.count); in ath11k_spectral_scan_config()
241 param.scan_fft_size = ar->spectral.fft_size; in ath11k_spectral_scan_config()
278 spectral_mode = ar->spectral.mode; in ath11k_read_file_spec_scan_ctl()
315 if (ar->spectral.mode == ATH11K_SPECTRAL_MANUAL || in ath11k_write_file_spec_scan_ctl()
316 ar->spectral.mode == ATH11K_SPECTRAL_BACKGROUND) { in ath11k_write_file_spec_scan_ctl()
320 ret = ath11k_spectral_scan_config(ar, ar->spectral.mode); in ath11k_write_file_spec_scan_ctl()
372 spectral_count = ar->spectral.count; in ath11k_read_file_spectral_count()
400 ar->spectral.count = val; in ath11k_write_file_spectral_count()
425 fft_size = ar->spectral.fft_size; in ath11k_read_file_spectral_bins()
452 val > ar->ab->hw_params.spectral.max_fft_bins) in ath11k_write_file_spectral_bins()
459 ar->spectral.fft_size = ilog2(val); in ath11k_write_file_spectral_bins()
593 lockdep_assert_held(&ar->spectral.lock); in ath11k_spectral_process_fft()
595 if (!ab->hw_params.spectral.fft_sz) { in ath11k_spectral_process_fft()
605 bin_len = tlv_len - ab->hw_params.spectral.fft_hdr_len; in ath11k_spectral_process_fft()
613 bin_sz = ab->hw_params.spectral.fft_sz + ab->hw_params.spectral.fft_pad_sz; in ath11k_spectral_process_fft()
625 check_length = sizeof(*fft_report) + (num_bins * ab->hw_params.spectral.fft_sz); in ath11k_spectral_process_fft()
647 if (ab->hw_params.spectral.fragment_160mhz) { in ath11k_spectral_process_fft()
681 if (!ar->spectral.is_primary) in ath11k_spectral_process_fft()
685 ar->spectral.is_primary = !ar->spectral.is_primary; in ath11k_spectral_process_fft()
689 ab->hw_params.spectral.fft_sz); in ath11k_spectral_process_fft()
696 if (ar->spectral.rfs_scan) in ath11k_spectral_process_fft()
697 relay_write(ar->spectral.rfs_scan, fft_sample, in ath11k_spectral_process_fft()
718 spin_lock_bh(&ar->spectral.lock); in ath11k_spectral_process_data()
720 if (!ar->spectral.enabled) { in ath11k_spectral_process_data()
774 ab->hw_params.spectral.summary_pad_sz; in ath11k_spectral_process_data()
823 spin_unlock_bh(&ar->spectral.lock); in ath11k_spectral_process_data()
830 struct ath11k_spectral *sp = &ar->spectral; in ath11k_spectral_ring_alloc()
869 struct ath11k_spectral *sp = &ar->spectral; in ath11k_spectral_ring_free()
877 debugfs_remove(ar->spectral.scan_bins); in ath11k_spectral_debug_unregister()
878 ar->spectral.scan_bins = NULL; in ath11k_spectral_debug_unregister()
880 debugfs_remove(ar->spectral.scan_count); in ath11k_spectral_debug_unregister()
881 ar->spectral.scan_count = NULL; in ath11k_spectral_debug_unregister()
883 debugfs_remove(ar->spectral.scan_ctl); in ath11k_spectral_debug_unregister()
884 ar->spectral.scan_ctl = NULL; in ath11k_spectral_debug_unregister()
886 if (ar->spectral.rfs_scan) { in ath11k_spectral_debug_unregister()
887 relay_close(ar->spectral.rfs_scan); in ath11k_spectral_debug_unregister()
888 ar->spectral.rfs_scan = NULL; in ath11k_spectral_debug_unregister()
902 if (!ar->spectral.enabled) in ath11k_spectral_reset_buffer()
905 if (ar->spectral.rfs_scan) in ath11k_spectral_reset_buffer()
906 relay_reset(ar->spectral.rfs_scan); in ath11k_spectral_reset_buffer()
917 sp = &ar->spectral; in ath11k_spectral_deinit()
939 ar->spectral.rfs_scan = relay_open("spectral_scan", in ath11k_spectral_debug_register()
944 if (!ar->spectral.rfs_scan) { in ath11k_spectral_debug_register()
950 ar->spectral.scan_ctl = debugfs_create_file("spectral_scan_ctl", in ath11k_spectral_debug_register()
954 if (!ar->spectral.scan_ctl) { in ath11k_spectral_debug_register()
961 ar->spectral.scan_count = debugfs_create_file("spectral_count", in ath11k_spectral_debug_register()
965 if (!ar->spectral.scan_count) { in ath11k_spectral_debug_register()
972 ar->spectral.scan_bins = debugfs_create_file("spectral_bins", in ath11k_spectral_debug_register()
976 if (!ar->spectral.scan_bins) { in ath11k_spectral_debug_register()
1002 if (!ab->hw_params.spectral.fft_sz) in ath11k_spectral_init()
1007 sp = &ar->spectral; in ath11k_spectral_init()
1052 if (ar->spectral.enabled) in ath11k_spectral_get_mode()
1053 return ar->spectral.mode; in ath11k_spectral_get_mode()
1060 if (ar->spectral.enabled) in ath11k_spectral_get_dbring()
1061 return &ar->spectral.rx_ring; in ath11k_spectral_get_dbring()