Lines Matching refs:fft_sample

68 	struct fft_sample_ath10k *fft_sample;  in ath10k_spectral_process_fft()  local
69 u8 buf[sizeof(*fft_sample) + SPECTRAL_ATH10K_MAX_NUM_BINS]; in ath10k_spectral_process_fft()
75 fft_sample = (struct fft_sample_ath10k *)&buf; in ath10k_spectral_process_fft()
85 length = sizeof(*fft_sample) - sizeof(struct fft_sample_tlv) + bin_len; in ath10k_spectral_process_fft()
86 fft_sample->tlv.type = ATH_FFT_SAMPLE_ATH10K; in ath10k_spectral_process_fft()
87 fft_sample->tlv.length = __cpu_to_be16(length); in ath10k_spectral_process_fft()
94 fft_sample->chan_width_mhz = 22; in ath10k_spectral_process_fft()
97 fft_sample->chan_width_mhz = 44; in ath10k_spectral_process_fft()
108 fft_sample->chan_width_mhz = 88; in ath10k_spectral_process_fft()
111 fft_sample->chan_width_mhz = phyerr->chan_width_mhz; in ath10k_spectral_process_fft()
114 fft_sample->relpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_RELPWR_DB); in ath10k_spectral_process_fft()
115 fft_sample->avgpwr_db = MS(reg1, SEARCH_FFT_REPORT_REG1_AVGPWR_DB); in ath10k_spectral_process_fft()
118 fft_sample->max_magnitude = __cpu_to_be16(peak_mag); in ath10k_spectral_process_fft()
119 fft_sample->max_index = MS(reg0, SEARCH_FFT_REPORT_REG0_PEAK_SIDX); in ath10k_spectral_process_fft()
120 fft_sample->rssi = phyerr->rssi_combined; in ath10k_spectral_process_fft()
124 fft_sample->total_gain_db = __cpu_to_be16(total_gain_db); in ath10k_spectral_process_fft()
125 fft_sample->base_pwr_db = __cpu_to_be16(base_pwr_db); in ath10k_spectral_process_fft()
129 fft_sample->freq1 = __cpu_to_be16(freq1); in ath10k_spectral_process_fft()
130 fft_sample->freq2 = __cpu_to_be16(freq2); in ath10k_spectral_process_fft()
134 fft_sample->noise = __cpu_to_be16(phyerr->nf_chains[chain_idx]); in ath10k_spectral_process_fft()
139 fft_sample->tsf = __cpu_to_be64(tsf); in ath10k_spectral_process_fft()
144 fft_sample->max_exp = get_max_exp(fft_sample->max_index, peak_mag, in ath10k_spectral_process_fft()
147 memcpy(fft_sample->data, bins, bin_len); in ath10k_spectral_process_fft()
153 fft_sample->data[dc_pos] = (fft_sample->data[dc_pos + 1] + in ath10k_spectral_process_fft()
154 fft_sample->data[dc_pos - 1]) / 2; in ath10k_spectral_process_fft()
156 send_fft_sample(ar, &fft_sample->tlv); in ath10k_spectral_process_fft()