Lines Matching refs:fft_sample
79 struct fft_sample_ath10k *fft_sample; in ath10k_spectral_process_fft() local
80 u8 buf[sizeof(*fft_sample) + SPECTRAL_ATH10K_MAX_NUM_BINS]; in ath10k_spectral_process_fft()
86 fft_sample = (struct fft_sample_ath10k *)&buf; in ath10k_spectral_process_fft()
96 length = sizeof(*fft_sample) - sizeof(struct fft_sample_tlv) + bin_len; in ath10k_spectral_process_fft()
97 fft_sample->tlv.type = ATH_FFT_SAMPLE_ATH10K; in ath10k_spectral_process_fft()
98 fft_sample->tlv.length = __cpu_to_be16(length); in ath10k_spectral_process_fft()
105 fft_sample->chan_width_mhz = 22; in ath10k_spectral_process_fft()
108 fft_sample->chan_width_mhz = 44; in ath10k_spectral_process_fft()
119 fft_sample->chan_width_mhz = 88; in ath10k_spectral_process_fft()
122 fft_sample->chan_width_mhz = phyerr->chan_width_mhz; in ath10k_spectral_process_fft()
125 fft_sample->relpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_RELPWR_DB); in ath10k_spectral_process_fft()
126 fft_sample->avgpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_AVGPWR_DB); in ath10k_spectral_process_fft()
129 fft_sample->max_magnitude = __cpu_to_be16(peak_mag); in ath10k_spectral_process_fft()
130 fft_sample->max_index = MS(reg0, SEARCH_FFT_REPORT_REG0_PEAK_SIDX); in ath10k_spectral_process_fft()
131 fft_sample->rssi = phyerr->rssi_combined; in ath10k_spectral_process_fft()
135 fft_sample->total_gain_db = __cpu_to_be16(total_gain_db); in ath10k_spectral_process_fft()
136 fft_sample->base_pwr_db = __cpu_to_be16(base_pwr_db); in ath10k_spectral_process_fft()
140 fft_sample->freq1 = __cpu_to_be16(freq1); in ath10k_spectral_process_fft()
141 fft_sample->freq2 = __cpu_to_be16(freq2); in ath10k_spectral_process_fft()
145 fft_sample->noise = __cpu_to_be16(phyerr->nf_chains[chain_idx]); in ath10k_spectral_process_fft()
150 fft_sample->tsf = __cpu_to_be64(tsf); in ath10k_spectral_process_fft()
155 fft_sample->max_exp = get_max_exp(fft_sample->max_index, peak_mag, in ath10k_spectral_process_fft()
158 memcpy(fft_sample->data, bins, bin_len); in ath10k_spectral_process_fft()
164 fft_sample->data[dc_pos] = (fft_sample->data[dc_pos + 1] + in ath10k_spectral_process_fft()
165 fft_sample->data[dc_pos - 1]) / 2; in ath10k_spectral_process_fft()
167 send_fft_sample(ar, &fft_sample->tlv); in ath10k_spectral_process_fft()