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()
88 length = sizeof(*fft_sample) - sizeof(struct fft_sample_tlv) + bin_len; in ath10k_spectral_process_fft()
89 fft_sample->tlv.type = ATH_FFT_SAMPLE_ATH10K; in ath10k_spectral_process_fft()
90 fft_sample->tlv.length = __cpu_to_be16(length); in ath10k_spectral_process_fft()
97 fft_sample->chan_width_mhz = 22; in ath10k_spectral_process_fft()
100 fft_sample->chan_width_mhz = 44; in ath10k_spectral_process_fft()
111 fft_sample->chan_width_mhz = 88; in ath10k_spectral_process_fft()
114 fft_sample->chan_width_mhz = phyerr->chan_width_mhz; in ath10k_spectral_process_fft()
117 fft_sample->relpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_RELPWR_DB); in ath10k_spectral_process_fft()
118 fft_sample->avgpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_AVGPWR_DB); in ath10k_spectral_process_fft()
121 fft_sample->max_magnitude = __cpu_to_be16(peak_mag); in ath10k_spectral_process_fft()
122 fft_sample->max_index = MS(reg0, SEARCH_FFT_REPORT_REG0_PEAK_SIDX); in ath10k_spectral_process_fft()
123 fft_sample->rssi = phyerr->rssi_combined; in ath10k_spectral_process_fft()
127 fft_sample->total_gain_db = __cpu_to_be16(total_gain_db); in ath10k_spectral_process_fft()
128 fft_sample->base_pwr_db = __cpu_to_be16(base_pwr_db); in ath10k_spectral_process_fft()
132 fft_sample->freq1 = __cpu_to_be16(freq1); in ath10k_spectral_process_fft()
133 fft_sample->freq2 = __cpu_to_be16(freq2); in ath10k_spectral_process_fft()
137 fft_sample->noise = __cpu_to_be16(phyerr->nf_chains[chain_idx]); in ath10k_spectral_process_fft()
142 fft_sample->tsf = __cpu_to_be64(tsf); in ath10k_spectral_process_fft()
147 fft_sample->max_exp = get_max_exp(fft_sample->max_index, peak_mag, in ath10k_spectral_process_fft()
150 memcpy(fft_sample->data, bins, bin_len); in ath10k_spectral_process_fft()
156 fft_sample->data[dc_pos] = (fft_sample->data[dc_pos + 1] + in ath10k_spectral_process_fft()
157 fft_sample->data[dc_pos - 1]) / 2; in ath10k_spectral_process_fft()
159 send_fft_sample(ar, &fft_sample->tlv); in ath10k_spectral_process_fft()