ACS: Fix ACS behavior for channel selection

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>
This commit is contained in:
Hari Naraayana Desikan Kannan 2024-04-30 15:22:31 +05:30 committed by Jouni Malinen
parent 83cfeb8903
commit be2ac92918

View 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,