Lines Matching full:snr
2357 enum chan_width max_cw, int snr) in wpas_adjust_snr_by_chanwidth() argument
2369 return snr + rssi_bump - noise_bump; in wpas_adjust_snr_by_chanwidth()
2407 * The scan result estimates SNR over 20 MHz, while Data frames in wpa_scan_result_compar()
2414 wa->snr); in wpa_scan_result_compar()
2419 wb->snr); in wpa_scan_result_compar()
2423 * SNR. Just use raw level (units unknown). */ in wpa_scan_result_compar()
2428 /* If SNR of a SAE BSS is good or at least as high as the PSK BSS, in wpa_scan_result_compar()
2454 /* If SNR is close, decide by max rate or frequency band. For cases in wpa_scan_result_compar()
2456 * of the SNR difference since the LPI/VLP rules may result in in wpa_scan_result_compar()
2457 * significant differences in SNR for cases where the estimated in wpa_scan_result_compar()
2458 * throughput can be considerably higher with the lower SNR. */ in wpa_scan_result_compar()
2474 /* all things being equal, use SNR; if SNRs are in wpa_scan_result_compar()
2557 " ssid=%s freq=%d qual=%d noise=%d%s level=%d snr=%d%s flags=0x%x age=%u est=%u", in dump_scan_res()
2562 r->snr, r->snr >= GREAT_SNR ? "*" : "", in dump_scan_res()
2648 res->snr = res->level - res->noise; in scan_snr()
2651 * SNR. Just use raw level (units unknown). */ in scan_snr()
2652 res->snr = res->level; in scan_snr()
2657 /* Minimum SNR required to achieve a certain bitrate. */
2677 { -1, 78000 } /* SNR > 29 */
2692 { -1, 180000 } /* SNR > 34 */
2707 { -1, 390000 } /* SNR > 37 */
2723 { -1, 780000 } /* SNR > 37 */
2745 { -1, 172100 } /* SNR > 42 */
2764 { -1, 344100 } /* SNR > 45 */
2783 { -1, 720600 } /* SNR > 48 */
2803 { -1, 1441200 } /* SNR > 51 */
2824 { -1, 2882400 } /* SNR > 54 */
2827 static unsigned int interpolate_rate(int snr, int snr0, int snr1, in interpolate_rate() argument
2830 return rate0 + (snr - snr0) * (rate1 - rate0) / (snr1 - snr0); in interpolate_rate()
2835 int snr, bool vht) in max_rate() argument
2840 (snr >= entry->minsnr) && in max_rate()
2848 return interpolate_rate(snr, prev->minsnr, entry->minsnr, prev->bitrate, in max_rate()
2853 static unsigned int max_ht20_rate(int snr, bool vht) in max_ht20_rate() argument
2855 return max_rate(vht20_table, snr, vht); in max_ht20_rate()
2859 static unsigned int max_ht40_rate(int snr, bool vht) in max_ht40_rate() argument
2861 return max_rate(vht40_table, snr, vht); in max_ht40_rate()
2865 static unsigned int max_vht80_rate(int snr) in max_vht80_rate() argument
2867 return max_rate(vht80_table, snr, 1); in max_vht80_rate()
2871 static unsigned int max_vht160_rate(int snr) in max_vht160_rate() argument
2873 return max_rate(vht160_table, snr, 1); in max_vht160_rate()
2878 int snr, bool eht) in max_he_eht_rate() argument
2882 while (entry->minsnr != -1 && snr >= entry->minsnr && in max_he_eht_rate()
2890 return interpolate_rate(snr, prev->minsnr, entry->minsnr, in max_he_eht_rate()
2897 int snr, int freq, enum chan_width *max_cw) in wpas_get_est_tpt() argument
2910 /* Limit based on estimated SNR */ in wpas_get_est_tpt()
2911 if (rate > 1 * 2 && snr < 1) in wpas_get_est_tpt()
2913 else if (rate > 2 * 2 && snr < 4) in wpas_get_est_tpt()
2915 else if (rate > 6 * 2 && snr < 5) in wpas_get_est_tpt()
2917 else if (rate > 9 * 2 && snr < 6) in wpas_get_est_tpt()
2919 else if (rate > 12 * 2 && snr < 7) in wpas_get_est_tpt()
2921 else if (rate > 12 * 2 && snr < 8) in wpas_get_est_tpt()
2923 else if (rate > 12 * 2 && snr < 9) in wpas_get_est_tpt()
2925 else if (rate > 18 * 2 && snr < 10) in wpas_get_est_tpt()
2927 else if (rate > 24 * 2 && snr < 11) in wpas_get_est_tpt()
2929 else if (rate > 24 * 2 && snr < 12) in wpas_get_est_tpt()
2931 else if (rate > 24 * 2 && snr < 13) in wpas_get_est_tpt()
2933 else if (rate > 24 * 2 && snr < 14) in wpas_get_est_tpt()
2935 else if (rate > 36 * 2 && snr < 15) in wpas_get_est_tpt()
2937 else if (rate > 36 * 2 && snr < 16) in wpas_get_est_tpt()
2939 else if (rate > 36 * 2 && snr < 17) in wpas_get_est_tpt()
2941 else if (rate > 36 * 2 && snr < 18) in wpas_get_est_tpt()
2943 else if (rate > 48 * 2 && snr < 19) in wpas_get_est_tpt()
2945 else if (rate > 48 * 2 && snr < 20) in wpas_get_est_tpt()
2947 else if (rate > 54 * 2 && snr < 21) in wpas_get_est_tpt()
2958 tmp = max_ht20_rate(snr, false); in wpas_get_est_tpt()
2973 adjusted_snr = snr + in wpas_get_est_tpt()
3007 tmp = max_ht20_rate(snr, true) + 1; in wpas_get_est_tpt()
3013 adjusted_snr = snr + in wpas_get_est_tpt()
3023 adjusted_snr = snr + in wpas_get_est_tpt()
3036 adjusted_snr = snr + in wpas_get_est_tpt()
3074 tmp = max_he_eht_rate(he20_table, snr, is_eht) + boost; in wpas_get_est_tpt()
3087 adjusted_snr = snr + wpas_channel_width_rssi_bump( in wpas_get_est_tpt()
3101 adjusted_snr = snr + wpas_channel_width_rssi_bump( in wpas_get_est_tpt()
3116 adjusted_snr = snr + wpas_channel_width_rssi_bump( in wpas_get_est_tpt()
3135 adjusted_snr = snr + wpas_channel_width_rssi_bump( in wpas_get_est_tpt()
3151 int snr = res->snr; in scan_est_throughput() local
3163 res->est_throughput = wpas_get_est_tpt(wpa_s, ies, ie_len, rate, snr, in scan_est_throughput()