From patchwork Fri Jan 30 22:45:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fumikazu Yobimoto X-Patchwork-Id: 435060 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 27D3D140277 for ; Sat, 31 Jan 2015 09:45:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D095C17C071; Fri, 30 Jan 2015 17:45:36 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RWCSeS9UOihP; Fri, 30 Jan 2015 17:45:36 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 562DB9D222; Fri, 30 Jan 2015 17:45:32 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B80579D222 for ; Fri, 30 Jan 2015 17:45:30 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UrXhaQ0E41Gr for ; Fri, 30 Jan 2015 17:45:26 -0500 (EST) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 63C099C186 for ; Fri, 30 Jan 2015 17:45:26 -0500 (EST) Received: by mail-yk0-f179.google.com with SMTP id 142so18285522ykq.10 for ; Fri, 30 Jan 2015 14:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=fxuVA7XrMRhWMbN3awS5t16iVPkCI4xG0C5xwg0ulIY=; b=HbXs4GxgyOD3Y4YmtdiGQ4DwxdzGgPrsdbvz2Rh7v7jrGhCSK9pQ10qxAggF5lcsmi FXuKDXFkiKVArP8SGfAtX/NfglEIzOFtFpg8Qjhuh/BJp/QbykAzYiEVxt3yQwd41Jvd wSQBoKfDlxxXjpEUvD43asthuk8bVsaoS6LqU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=fxuVA7XrMRhWMbN3awS5t16iVPkCI4xG0C5xwg0ulIY=; b=aScGCpptoPdCwrpNVfPiqHCcFJli2qXLYZKlwDPhlD5ZbD1brD4VrG3Newlu9O/lrf ngL14sWnB6UUDJGDT35UcL2Ed5fGBnkfbPVLSOceeeSMn72isL0Zmkjg5Pz37MjqNNvy jtqXjSGamhkXDcvV4TsXSVxXkyYYh0aqB2kksPci4wfaYSjB1/38mwEZ1Yau8YjcPH1b 3/hxb9iVSRxBjnEfQnxZe+f0eSGQECVz1r+UPJ9xQjIMKfOJ8nJQwp8IKKoOMJYeKrKL QlRr/+C0BEIeiM/K4+noWGIOgF+y9Fh71WonYFmyJyChDV4pd0H7pv0F6oy2PYOhUCEE Zzig== X-Gm-Message-State: ALoCoQl5qjx+r3qyw0sfv7e4tJfgYZIPjKB5FZaOjmXzsC/NxPdFdw4HRVv4sfAqo/EML5at3zJT MIME-Version: 1.0 X-Received: by 10.236.23.73 with SMTP id u49mr4127568yhu.73.1422657925862; Fri, 30 Jan 2015 14:45:25 -0800 (PST) Received: by 10.170.186.149 with HTTP; Fri, 30 Jan 2015 14:45:25 -0800 (PST) Date: Fri, 30 Jan 2015 14:45:25 -0800 Message-ID: Subject: ACS seems not to select the best channel in 2.4GHz. From: Fumikazu Yobimoto To: hostap@lists.shmoo.com X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 From: Fumikazu Yobimoto 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);