Move scan/roaming related defines to a header file
This is a step towards allowing these values to be used in both scan.c and events.c. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
parent
98ea9d5d51
commit
ef1a45f28a
2 changed files with 22 additions and 22 deletions
|
@ -1956,20 +1956,6 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi(const struct wpa_scan_res *res,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Channels with a great SNR can operate at full rate. What is a great SNR?
|
||||
* This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general
|
||||
* rule of thumb is that any SNR above 20 is good." This one
|
||||
* http://www.cisco.com/en/US/tech/tk722/tk809/technologies_q_and_a_item09186a00805e9a96.shtml#qa23
|
||||
* recommends 25 as a minimum SNR for 54 Mbps data rate. The estimates used in
|
||||
* scan_est_throughput() allow even smaller SNR values for the maximum rates
|
||||
* (21 for 54 Mbps, 22 for VHT80 MCS9, 24 for HT40 and HT20 MCS7). Use 25 as a
|
||||
* somewhat conservative value here.
|
||||
*/
|
||||
#define GREAT_SNR 25
|
||||
|
||||
#define IS_5GHZ(n) (n > 4000)
|
||||
|
||||
/* Compare function for sorting scan results. Return >0 if @b is considered
|
||||
* better. */
|
||||
static int wpa_scan_result_compar(const void *a, const void *b)
|
||||
|
@ -2178,14 +2164,6 @@ void filter_scan_res(struct wpa_supplicant *wpa_s,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Noise floor values to use when we have signal strength
|
||||
* measurements, but no noise floor measurements. These values were
|
||||
* measured in an office environment with many APs.
|
||||
*/
|
||||
#define DEFAULT_NOISE_FLOOR_2GHZ (-89)
|
||||
#define DEFAULT_NOISE_FLOOR_5GHZ (-92)
|
||||
|
||||
void scan_snr(struct wpa_scan_res *res)
|
||||
{
|
||||
if (res->flags & WPA_SCAN_NOISE_INVALID) {
|
||||
|
|
|
@ -9,6 +9,28 @@
|
|||
#ifndef SCAN_H
|
||||
#define SCAN_H
|
||||
|
||||
/*
|
||||
* Noise floor values to use when we have signal strength
|
||||
* measurements, but no noise floor measurements. These values were
|
||||
* measured in an office environment with many APs.
|
||||
*/
|
||||
#define DEFAULT_NOISE_FLOOR_2GHZ (-89)
|
||||
#define DEFAULT_NOISE_FLOOR_5GHZ (-92)
|
||||
|
||||
/*
|
||||
* Channels with a great SNR can operate at full rate. What is a great SNR?
|
||||
* This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general
|
||||
* rule of thumb is that any SNR above 20 is good." This one
|
||||
* http://www.cisco.com/en/US/tech/tk722/tk809/technologies_q_and_a_item09186a00805e9a96.shtml#qa23
|
||||
* recommends 25 as a minimum SNR for 54 Mbps data rate. The estimates used in
|
||||
* scan_est_throughput() allow even smaller SNR values for the maximum rates
|
||||
* (21 for 54 Mbps, 22 for VHT80 MCS9, 24 for HT40 and HT20 MCS7). Use 25 as a
|
||||
* somewhat conservative value here.
|
||||
*/
|
||||
#define GREAT_SNR 25
|
||||
|
||||
#define IS_5GHZ(n) (n > 4000)
|
||||
|
||||
int wpa_supplicant_enabled_networks(struct wpa_supplicant *wpa_s);
|
||||
void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec);
|
||||
int wpa_supplicant_delayed_sched_scan(struct wpa_supplicant *wpa_s,
|
||||
|
|
Loading…
Reference in a new issue