]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ACS: Fix ACS behavior for channel selection
authorHari Naraayana Desikan Kannan <quic_hnaraaya@quicinc.com>
Tue, 30 Apr 2024 09:52:31 +0000 (15:22 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 12 Jul 2024 09:40:00 +0000 (12:40 +0300)
The current ACS algorithm incorrectly returns success even when there is
no survey list, leading to improper interference factor calculation.
This leads to treating 0 as a valid interference factor, which affects
channel selection judgment.

Fix the issue by ensuring success is only returned when the survey list
is not empty, thereby ignoring non-zero values in the interference
factor calculation.

Signed-off-by: Hari Naraayana Desikan Kannan <quic_hnaraaya@quicinc.com>
src/ap/acs.c

index c38d3632b3c6000eddd0ed140db0cdd30f11534e..7e1b56700bde213976174fae220be7250b538353 100644 (file)
@@ -511,7 +511,7 @@ static int acs_survey_list_is_sufficient(struct hostapd_channel_data *chan)
        }
 
        if (ret == -1)
-               ret = 1; /* no survey list entries */
+               ret = 0; /* no survey list entries */
 
        if (!ret) {
                wpa_printf(MSG_INFO,