hostapd: implement fallback for incomplete survey data
This commit is contained in:
parent
f9d49d7408
commit
1d6e53a569
1 changed files with 2 additions and 3 deletions
|
@ -471,17 +471,17 @@ static int acs_get_bw_center_chan(int freq, enum bw_type bw)
|
||||||
static int acs_survey_is_sufficient(struct freq_survey *survey)
|
static int acs_survey_is_sufficient(struct freq_survey *survey)
|
||||||
{
|
{
|
||||||
if (!(survey->filled & SURVEY_HAS_NF)) {
|
if (!(survey->filled & SURVEY_HAS_NF)) {
|
||||||
|
survey->nf = -95;
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"ACS: Survey for freq %d is missing noise floor",
|
"ACS: Survey for freq %d is missing noise floor",
|
||||||
survey->freq);
|
survey->freq);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
|
if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
|
||||||
|
survey->channel_time = 0;
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"ACS: Survey for freq %d is missing channel time",
|
"ACS: Survey for freq %d is missing channel time",
|
||||||
survey->freq);
|
survey->freq);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
|
if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
|
||||||
|
@ -489,7 +489,6 @@ static int acs_survey_is_sufficient(struct freq_survey *survey)
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
|
"ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
|
||||||
survey->freq);
|
survey->freq);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue