Lines Matching refs:fft_sample_40

240 	struct fft_sample_ht20_40 fft_sample_40;  in ath_cmn_process_ht20_40_fft()  local
261 length = sizeof(fft_sample_40) - sizeof(struct fft_sample_tlv); in ath_cmn_process_ht20_40_fft()
262 fft_sample_40.tlv.type = ATH_FFT_SAMPLE_HT20_40; in ath_cmn_process_ht20_40_fft()
263 fft_sample_40.tlv.length = __cpu_to_be16(length); in ath_cmn_process_ht20_40_fft()
264 fft_sample_40.freq = __cpu_to_be16(freq); in ath_cmn_process_ht20_40_fft()
265 fft_sample_40.channel_type = chan_type; in ath_cmn_process_ht20_40_fft()
271 fft_sample_40.lower_noise = ah->noise; in ath_cmn_process_ht20_40_fft()
272 fft_sample_40.upper_noise = ext_nf; in ath_cmn_process_ht20_40_fft()
277 fft_sample_40.lower_noise = ext_nf; in ath_cmn_process_ht20_40_fft()
278 fft_sample_40.upper_noise = ah->noise; in ath_cmn_process_ht20_40_fft()
281 fft_sample_40.lower_rssi = lower_rssi; in ath_cmn_process_ht20_40_fft()
282 fft_sample_40.upper_rssi = upper_rssi; in ath_cmn_process_ht20_40_fft()
288 fft_sample_40.lower_max_magnitude = __cpu_to_be16(lower_mag); in ath_cmn_process_ht20_40_fft()
291 fft_sample_40.upper_max_magnitude = __cpu_to_be16(upper_mag); in ath_cmn_process_ht20_40_fft()
294 fft_sample_40.lower_max_index = lower_max_index; in ath_cmn_process_ht20_40_fft()
297 fft_sample_40.upper_max_index = upper_max_index; in ath_cmn_process_ht20_40_fft()
300 fft_sample_40.lower_bitmap_weight = lower_bitmap_w; in ath_cmn_process_ht20_40_fft()
303 fft_sample_40.upper_bitmap_weight = upper_bitmap_w; in ath_cmn_process_ht20_40_fft()
306 fft_sample_40.max_exp = max_exp; in ath_cmn_process_ht20_40_fft()
308 fft_sample_40.tsf = __cpu_to_be64(tsf); in ath_cmn_process_ht20_40_fft()
310 memcpy(fft_sample_40.data, sample_buf, SPECTRAL_HT20_40_NUM_BINS); in ath_cmn_process_ht20_40_fft()
323 if (((fft_sample_40.data[upper_max_index + dc_pos] & 0xf8) in ath_cmn_process_ht20_40_fft()
325 ((fft_sample_40.data[lower_max_index] & 0xf8) in ath_cmn_process_ht20_40_fft()
334 fft_sample_40.data[dc_pos] = (fft_sample_40.data[dc_pos + 1] + in ath_cmn_process_ht20_40_fft()
335 fft_sample_40.data[dc_pos - 1]) / 2; in ath_cmn_process_ht20_40_fft()
344 if (fft_sample_40.data[i] > tmp_mag) { in ath_cmn_process_ht20_40_fft()
345 tmp_mag = fft_sample_40.data[i]; in ath_cmn_process_ht20_40_fft()
346 fft_sample_40.lower_max_index = i; in ath_cmn_process_ht20_40_fft()
351 fft_sample_40.lower_max_magnitude = __cpu_to_be16(lower_mag); in ath_cmn_process_ht20_40_fft()
355 tmp_mag, fft_sample_40.lower_max_index); in ath_cmn_process_ht20_40_fft()
358 if (fft_sample_40.data[i] == (lower_mag >> max_exp)) in ath_cmn_process_ht20_40_fft()
361 fft_sample_40.data[i], i); in ath_cmn_process_ht20_40_fft()
363 if (fft_sample_40.data[i] > (lower_mag >> max_exp)) { in ath_cmn_process_ht20_40_fft()
366 i, fft_sample_40.data[i]); in ath_cmn_process_ht20_40_fft()
374 if (fft_sample_40.data[i] > tmp_mag) { in ath_cmn_process_ht20_40_fft()
375 tmp_mag = fft_sample_40.data[i]; in ath_cmn_process_ht20_40_fft()
376 fft_sample_40.upper_max_index = i; in ath_cmn_process_ht20_40_fft()
380 fft_sample_40.upper_max_magnitude = __cpu_to_be16(upper_mag); in ath_cmn_process_ht20_40_fft()
384 tmp_mag, fft_sample_40.upper_max_index); in ath_cmn_process_ht20_40_fft()
387 if (fft_sample_40.data[i] == (upper_mag >> max_exp)) in ath_cmn_process_ht20_40_fft()
390 fft_sample_40.data[i], i); in ath_cmn_process_ht20_40_fft()
392 if (fft_sample_40.data[i] > (upper_mag >> max_exp)) { in ath_cmn_process_ht20_40_fft()
395 i, fft_sample_40.data[i]); in ath_cmn_process_ht20_40_fft()
404 tlv = (struct fft_sample_tlv *)&fft_sample_40; in ath_cmn_process_ht20_40_fft()