Lines Matching +full:0 +full:xf8
24 rssi_val = 0; in fix_rssi_inv_only()
65 max_exp = mag_info->max_exp & 0xf; in ath_cmn_max_idx_verify_ht20_fft()
68 * in case of a missing byte (so bins[0] will be outside in ath_cmn_max_idx_verify_ht20_fft()
74 if ((sample[max_index] & 0xf8) != ((max_magnitude >> max_exp) & 0xf8)) in ath_cmn_max_idx_verify_ht20_fft()
77 return 0; in ath_cmn_max_idx_verify_ht20_fft()
107 max_exp = mag_info->max_exp & 0xf; in ath_cmn_max_idx_verify_ht20_40_fft()
110 * in case of a missing byte (so bins[0] will be outside in ath_cmn_max_idx_verify_ht20_40_fft()
117 if (((sample[upper_max_index + dc_pos] & 0xf8) != in ath_cmn_max_idx_verify_ht20_40_fft()
118 ((upper_mag >> max_exp) & 0xf8)) || in ath_cmn_max_idx_verify_ht20_40_fft()
119 ((sample[lower_max_index] & 0xf8) != in ath_cmn_max_idx_verify_ht20_40_fft()
120 ((lower_mag >> max_exp) & 0xf8))) in ath_cmn_max_idx_verify_ht20_40_fft()
123 return 0; in ath_cmn_max_idx_verify_ht20_40_fft()
141 int i = 0; in ath_cmn_process_ht20_fft()
142 int ret = 0; in ath_cmn_process_ht20_fft()
151 fft_sample_20.rssi = fix_rssi_inv_only(rs->rs_rssi_ctl[0]); in ath_cmn_process_ht20_fft()
166 max_exp = mag_info->max_exp & 0xf; in ath_cmn_process_ht20_fft()
173 ath_dbg(common, SPECTRAL_SCAN, "FFT HT20 frame: max mag 0x%X," in ath_cmn_process_ht20_fft()
178 if ((fft_sample_20.data[max_index] & 0xf8) != in ath_cmn_process_ht20_fft()
179 ((magnitude >> max_exp) & 0xf8)) { in ath_cmn_process_ht20_fft()
195 tmp_mag = 0; in ath_cmn_process_ht20_fft()
196 for (i = 0; i < dc_pos; i++) { in ath_cmn_process_ht20_fft()
207 "Calculated new lower max 0x%X at %i\n", in ath_cmn_process_ht20_fft()
210 for (i = 0; i < SPECTRAL_HT20_NUM_BINS; i++) { in ath_cmn_process_ht20_fft()
213 "Got max: 0x%X at index %i\n", in ath_cmn_process_ht20_fft()
218 "Got bin %i greater than max: 0x%X\n", in ath_cmn_process_ht20_fft()
224 if (ret < 0) in ath_cmn_process_ht20_fft()
231 return 0; in ath_cmn_process_ht20_fft()
247 int i = 0; in ath_cmn_process_ht20_40_fft()
248 int ret = 0; in ath_cmn_process_ht20_40_fft()
268 lower_rssi = fix_rssi_inv_only(rs->rs_rssi_ctl[0]); in ath_cmn_process_ht20_40_fft()
269 upper_rssi = fix_rssi_inv_only(rs->rs_rssi_ext[0]); in ath_cmn_process_ht20_40_fft()
274 lower_rssi = fix_rssi_inv_only(rs->rs_rssi_ext[0]); in ath_cmn_process_ht20_40_fft()
275 upper_rssi = fix_rssi_inv_only(rs->rs_rssi_ctl[0]); in ath_cmn_process_ht20_40_fft()
305 max_exp = mag_info->max_exp & 0xf; in ath_cmn_process_ht20_40_fft()
312 ath_dbg(common, SPECTRAL_SCAN, "FFT HT20/40 frame: lower mag 0x%X," in ath_cmn_process_ht20_40_fft()
313 "lower_mag_idx %i, upper mag 0x%X," 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()
324 != ((upper_mag >> max_exp) & 0xf8)) || in ath_cmn_process_ht20_40_fft()
325 ((fft_sample_40.data[lower_max_index] & 0xf8) in ath_cmn_process_ht20_40_fft()
326 != ((lower_mag >> max_exp) & 0xf8))) { in ath_cmn_process_ht20_40_fft()
342 tmp_mag = 0; in ath_cmn_process_ht20_40_fft()
343 for (i = 0; i < dc_pos; i++) { in ath_cmn_process_ht20_40_fft()
354 "Calculated new lower max 0x%X at %i\n", in ath_cmn_process_ht20_40_fft()
357 for (i = 0; i < dc_pos; i++) { in ath_cmn_process_ht20_40_fft()
360 "Got lower mag: 0x%X at index %i\n", in ath_cmn_process_ht20_40_fft()
365 "Got lower bin %i higher than max: 0x%X\n", in ath_cmn_process_ht20_40_fft()
372 tmp_mag = 0; in ath_cmn_process_ht20_40_fft()
383 "Calculated new upper max 0x%X at %i\n", in ath_cmn_process_ht20_40_fft()
389 "Got upper mag: 0x%X at index %i\n", in ath_cmn_process_ht20_40_fft()
394 "Got upper bin %i higher than max: 0x%X\n", in ath_cmn_process_ht20_40_fft()
401 if (ret < 0) in ath_cmn_process_ht20_40_fft()
408 return 0; in ath_cmn_process_ht20_40_fft()
420 case 0: in ath_cmn_copy_fft_frame()
450 int i = 0; in ath_cmn_is_fft_buf_full()
451 int ret = 0; in ath_cmn_is_fft_buf_full()
464 return 0; in ath_cmn_is_fft_buf_full()
471 u8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0}; in ath_cmn_process_fft()
479 int got_slen = 0; in ath_cmn_process_fft()
481 int sample_bytes = 0; in ath_cmn_process_fft()
482 int ret = 0; in ath_cmn_process_fft()
495 return 0; in ath_cmn_process_fft()
502 return 0; in ath_cmn_process_fft()
533 ath_dbg(common, SPECTRAL_SCAN, "Got radar dump bw_info: 0x%X," in ath_cmn_process_fft()
539 for (i = 0; i < len - 2; i++) { in ath_cmn_process_fft()
560 if (vdata[i] <= 0x7 && sample_bytes >= sample_len - 1) { in ath_cmn_process_fft()
600 (vdata[i + 1] <= 0x7)) in ath_cmn_process_fft()
605 (vdata[i + 1] <= 0x7)) in ath_cmn_process_fft()
626 if (ret == 0) in ath_cmn_process_fft()
631 memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN); in ath_cmn_process_fft()
644 if (ret == 0) in ath_cmn_process_fft()
668 if (ret == 0) { in ath_cmn_process_fft()
672 got_slen = 0; in ath_cmn_process_fft()
740 * (on my ar9220 to value 0x01002310) in ath9k_cmn_spectral_scan_trigger()
761 spec_priv->spec_config.enabled = 0; in ath9k_cmn_spectral_scan_config()
772 spec_priv->spec_config.endless = 0; in ath9k_cmn_spectral_scan_config()
785 return 0; in ath9k_cmn_spectral_scan_config()
805 buf[len] = '\0'; in write_file_spec_scan_ctl()
807 if (strncmp("trigger", buf, 7) == 0) { in write_file_spec_scan_ctl()
809 } else if (strncmp("background", buf, 10) == 0) { in write_file_spec_scan_ctl()
812 } else if (strncmp("chanscan", buf, 8) == 0) { in write_file_spec_scan_ctl()
815 } else if (strncmp("manual", buf, 6) == 0) { in write_file_spec_scan_ctl()
818 } else if (strncmp("disable", buf, 7) == 0) { in write_file_spec_scan_ctl()
860 ret = kstrtoul_from_user(user_buf, count, 0, &val); in write_file_spectral_short_repeat()
903 ret = kstrtoul_from_user(user_buf, count, 0, &val); in write_file_spectral_count()
945 ret = kstrtoul_from_user(user_buf, count, 0, &val); in write_file_spectral_period()
988 ret = kstrtoul_from_user(user_buf, count, 0, &val); in write_file_spectral_fft_period()
1032 return 0; in remove_buf_file_handler()