From 066ddfaca33016fb0acb3516e7ca71a715518580 Mon Sep 17 00:00:00 2001 From: Ramasamy Kaliappan Date: Thu, 20 Jul 2023 19:42:34 +0530 Subject: [PATCH 2/4] hostapd: revert the acs changes to bringup ap in acs Revert the patch https://w1.fi/cgit/hostap/commit/?id=4cb23b66d6eac1e1afb6cfd4f51b0f3ba328c078 and updated the changes before hostapd upgrade. Signed-off-by: Ramasamy Kaliappan --- src/ap/acs.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/ap/acs.c b/src/ap/acs.c index d9f85e8..576cbe5 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -908,7 +908,7 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface, struct hostapd_channel_data **ideal_chan, long double *ideal_factor) { - struct hostapd_channel_data *chan, *adj_chan = NULL, *best; + struct hostapd_channel_data *chan, *adj_chan = NULL; long double factor; int i, j; unsigned int k; @@ -918,7 +918,7 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface, struct acs_bias *bias, tmp_bias; bool update_best = true; - best = chan = &mode->channels[i]; + chan = &mode->channels[i]; /* Since in the current ACS implementation the first channel is * always a primary channel, skip channels not available as @@ -1042,18 +1042,6 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface, continue; } - /* If the AP is in the 5 GHz or 6 GHz band, lets prefer a less - * crowded primary channel if one was found in the segment */ - if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A && - chan != best) { - wpa_printf(MSG_DEBUG, - "ACS: promoting channel %d over %d (less interference %Lg/%Lg)", - best->chan, chan->chan, - chan->interference_factor, - best->interference_factor); - chan = best; - } - /* 2.4 GHz has overlapping 20 MHz channels. Include adjacent * channel interference factor. */ if (is_24ghz_mode(mode->mode)) { -- 2.17.1