359b5f3ef8f45c14e06ba884b67855b8949eb402
[openwrt/staging/dedeckeh.git] / package / network / services / hostapd / patches / 470-survey_data_fallback.patch
1 --- a/src/ap/acs.c
2 +++ b/src/ap/acs.c
3 @@ -420,20 +420,19 @@ static int acs_usable_bw160_chan(const s
4 static int acs_survey_is_sufficient(struct freq_survey *survey)
5 {
6 if (!(survey->filled & SURVEY_HAS_NF)) {
7 + survey->nf = -95;
8 wpa_printf(MSG_INFO, "ACS: Survey is missing noise floor");
9 - return 0;
10 }
11
12 if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
13 + survey->channel_time = 0;
14 wpa_printf(MSG_INFO, "ACS: Survey is missing channel time");
15 - return 0;
16 }
17
18 if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
19 !(survey->filled & SURVEY_HAS_CHAN_TIME_RX)) {
20 wpa_printf(MSG_INFO,
21 "ACS: Survey is missing RX and busy time (at least one is required)");
22 - return 0;
23 }
24
25 return 1;