<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From: Felix Fietkau &lt;nbd@nbd.name&gt;
Date: Wed, 15 Jun 2016 17:31:48 +0200
Subject: [PATCH] hostapd: implement fallback for incomplete survey data

--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -467,17 +467,17 @@ static int acs_get_bw_center_chan(int fr
 static int acs_survey_is_sufficient(struct freq_survey *survey)
 {
 	if (!(survey-&gt;filled &amp; SURVEY_HAS_NF)) {
+		survey-&gt;nf = -95;
 		wpa_printf(MSG_INFO,
 			   "ACS: Survey for freq %d is missing noise floor",
 			   survey-&gt;freq);
-		return 0;
 	}
 
 	if (!(survey-&gt;filled &amp; SURVEY_HAS_CHAN_TIME)) {
+		survey-&gt;channel_time = 0;
 		wpa_printf(MSG_INFO,
 			   "ACS: Survey for freq %d is missing channel time",
 			   survey-&gt;freq);
-		return 0;
 	}
 
 	if (!(survey-&gt;filled &amp; SURVEY_HAS_CHAN_TIME_BUSY) &amp;&amp;
@@ -485,7 +485,6 @@ static int acs_survey_is_sufficient(stru
 		wpa_printf(MSG_INFO,
 			   "ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
 			   survey-&gt;freq);
-		return 0;
 	}
 
 	return 1;
</pre></body></html>