wlan-ap-Telecominfraproject/feeds/ipq95xx/hostapd/patches/470-survey_data_fallback.patch
John Crispin b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00

46 lines
1.4 KiB
Diff

Index: hostapd-2021-12-13-b26f5c0f/src/ap/acs.c
===================================================================
--- hostapd-2021-12-13-b26f5c0f.orig/src/ap/acs.c
+++ hostapd-2021-12-13-b26f5c0f/src/ap/acs.c
@@ -302,16 +302,12 @@ static void acs_fail(struct hostapd_ifac
static long double
acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf)
{
- long double factor, busy, total;
+ long double factor, busy = 0, total;
if (survey->filled & SURVEY_HAS_CHAN_TIME_BUSY)
busy = survey->channel_time_busy;
else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX)
busy = survey->channel_time_rx;
- else {
- wpa_printf(MSG_ERROR, "ACS: Survey data missing");
- return 0;
- }
total = survey->channel_time;
@@ -420,20 +416,19 @@ static int acs_usable_bw160_chan(const s
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;