meta-netmodule-wlan/recipes-connectivity/hostapd/files/470-survey_data_fallback.patch

36 lines
1.0 KiB
Diff

From 78ec7a84dd829e4dbc0bfd2d9c82d7c1a06467ef Mon Sep 17 00:00:00 2001
From: Patrick Walther <patrick.walther@netmodule.com>
Date: Fri, 24 Jul 2020 14:41:09 +0200
---
src/ap/acs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/ap/acs.c b/src/ap/acs.c
index faaedbfdb..a24e5410c 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -420,20 +420,19 @@ static int acs_usable_bw160_chan(const struct hostapd_channel_data *chan)
static int acs_survey_is_sufficient(struct freq_survey *survey)
{
if (!(survey->filled & SURVEY_HAS_NF)) {
+ survey->nf = -95;
wpa_printf(MSG_INFO, "ACS: Survey is missing noise floor");
- return 0;
}
if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
+ survey->channel_time = 0;
wpa_printf(MSG_INFO, "ACS: Survey is missing channel time");
- return 0;
}
if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
!(survey->filled & SURVEY_HAS_CHAN_TIME_RX)) {
wpa_printf(MSG_INFO,
"ACS: Survey is missing RX and busy time (at least one is required)");
- return 0;
}
return 1;