Lines Matching refs:fft_sample
64 struct fft_sample_ath10k *fft_sample; in ath10k_spectral_process_fft() local
65 u8 buf[sizeof(*fft_sample) + SPECTRAL_ATH10K_MAX_NUM_BINS]; in ath10k_spectral_process_fft()
71 fft_sample = (struct fft_sample_ath10k *)&buf; in ath10k_spectral_process_fft()
79 length = sizeof(*fft_sample) - sizeof(struct fft_sample_tlv) + bin_len; in ath10k_spectral_process_fft()
80 fft_sample->tlv.type = ATH_FFT_SAMPLE_ATH10K; in ath10k_spectral_process_fft()
81 fft_sample->tlv.length = __cpu_to_be16(length); in ath10k_spectral_process_fft()
88 fft_sample->chan_width_mhz = 22; in ath10k_spectral_process_fft()
91 fft_sample->chan_width_mhz = 44; in ath10k_spectral_process_fft()
102 fft_sample->chan_width_mhz = 88; in ath10k_spectral_process_fft()
105 fft_sample->chan_width_mhz = phyerr->chan_width_mhz; in ath10k_spectral_process_fft()
108 fft_sample->relpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_RELPWR_DB); in ath10k_spectral_process_fft()
109 fft_sample->avgpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_AVGPWR_DB); in ath10k_spectral_process_fft()
112 fft_sample->max_magnitude = __cpu_to_be16(peak_mag); in ath10k_spectral_process_fft()
113 fft_sample->max_index = MS(reg0, SEARCH_FFT_REPORT_REG0_PEAK_SIDX); in ath10k_spectral_process_fft()
114 fft_sample->rssi = phyerr->rssi_combined; in ath10k_spectral_process_fft()
118 fft_sample->total_gain_db = __cpu_to_be16(total_gain_db); in ath10k_spectral_process_fft()
119 fft_sample->base_pwr_db = __cpu_to_be16(base_pwr_db); in ath10k_spectral_process_fft()
123 fft_sample->freq1 = __cpu_to_be16(freq1); in ath10k_spectral_process_fft()
124 fft_sample->freq2 = __cpu_to_be16(freq2); in ath10k_spectral_process_fft()
128 fft_sample->noise = __cpu_to_be16( in ath10k_spectral_process_fft()
134 fft_sample->tsf = __cpu_to_be64(tsf); in ath10k_spectral_process_fft()
139 fft_sample->max_exp = get_max_exp(fft_sample->max_index, peak_mag, in ath10k_spectral_process_fft()
142 memcpy(fft_sample->data, bins, bin_len); in ath10k_spectral_process_fft()
148 fft_sample->data[dc_pos] = (fft_sample->data[dc_pos + 1] + in ath10k_spectral_process_fft()
149 fft_sample->data[dc_pos - 1]) / 2; in ath10k_spectral_process_fft()
151 send_fft_sample(ar, &fft_sample->tlv); in ath10k_spectral_process_fft()