diff mbox

ACS seems not to select the best channel in 2.4GHz.

Message ID CAJXgcAUipyhD7WBf6LeWLWqwJWTpMUiyXRWcG=AV23aD9wzEeA@mail.gmail.com
State Superseded
Headers show

Commit Message

Fumikazu Yobimoto Jan. 30, 2015, 10:45 p.m. UTC
I verified the ACS(Auto Channel Select) in 2.4GHz environment.
Set 2 APs, one is ch.1 and one is ch.11, and then transmit a heavy traffic
at each channel.
I'm expecting ACS should choose ch.6 for ideal channel, but it always
choose ch.1 or ch.11 in any case.

The hostapd debug log shows each interference factor(5 times average) is
below.
1=0.420
2=0.764
3=0.743
4=0.729
5=0.366
6=0.158
7=0.404
8=0.613
9=0.601
10=0.585
11=0.630

It works fine. ACS seems to be able to calculate the interference factor
correctly. The value of ch.6 indicates the lowest.
However, acs.c tries to add adjacent channel's value. Thus eventually,
those values go like as following.
1=1.928 (1+2+3)
2=2.658 (1+2+3+4)
3=3.024 (1+2+3+4+5)
4=2.762 (2+3+4+5+6)
5=2.402 (3+4+5+6+7)
6=2.272 (4+5+6+7+8)
7=2.143
8=2.362
9=2.834
10=2.429
11=1.816

I tried this test couple of times, but I can see the ideal channel was
always selected to ch.1 or ch.11.
I think it's not necessary to add adjacent value. Because radio survey data
of each channel would detect the adjacent interference actually 20MHz.
In fact, the test result shows that ch.4 detect the interference of ch.1,
similarly ch.8 detect the interference of ch.11.
I attached a patch file for hostapd-v2.3 .

Thanks,
Yobi
============================
Fumikazu Yobimoto
diff mbox

Patch

From: Fumikazu Yobimoto <fyobimoto@chromium.org>

This patch fixes ACS problem.

--- ./acs.c	2015-01-28 15:46:55.901068856 -0800
+++ ./acs.c	2015-01-28 15:47:47.613696475 -0800
@@ -583,6 +583,7 @@  acs_find_ideal_chan(struct hostapd_iface
 			continue;
 		}
 
+#if 0 /* No need to include adjacent channel  */
 		/* 2.4 GHz has overlapping 20 MHz channels. Include adjacent
 		 * channel interference factor. */
 		if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211B ||
@@ -612,6 +613,7 @@  acs_find_ideal_chan(struct hostapd_iface
 					factor += adj_chan->interference_factor;
 			}
 		}
+#endif
 
 		wpa_printf(MSG_DEBUG, "ACS:  * channel %d: total interference = %Lg",
 			   chan->chan, factor);