Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:55144 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215Ab1FCFXp convert rfc822-to-8bit (ORCPT ); Fri, 3 Jun 2011 01:23:45 -0400 Received: by iwn34 with SMTP id 34so1160008iwn.19 for ; Thu, 02 Jun 2011 22:23:44 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DE82191.3010205@openwrt.org> References: <201105241627.49201.helmut.schaa@googlemail.com> <4DDD5691.2040205@openwrt.org> <4DDE2F5B.3020804@openwrt.org> <4DDEEEEC.6010800@openwrt.org> <4DE82191.3010205@openwrt.org> From: "Luis R. Rodriguez" Date: Thu, 2 Jun 2011 22:23:24 -0700 Message-ID: (sfid-20110603_072348_326217_D7BB6457) Subject: Re: Initial automatic channel selection implementation To: Felix Fietkau Cc: Matt Smith , Sundar Sankaran , Helmut Schaa , linux-wireless , hostap@lists.shmoo.com Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, Jun 2, 2011 at 4:49 PM, Felix Fietkau wrote: > On 2011-06-03 12:36 AM, Luis R. Rodriguez wrote: >> >> On Thu, May 26, 2011 at 5:59 PM, Luis R. Rodriguez >>  wrote: >>> >>>   What I'd like to do is to affect the ratio to nullify it if the noise >>>   is very low on the channel. Given that noise is logarithmic we'd have >>>   to use a logarithmic function as well. Working on that now. >> >> OK I've figured a way to plug the noise into this, I designed the >> following function we can use as a factor: >> >> 1.1^(x+110) >> >> Wolfram|Alpha boring details of this function: >> >> http://bit.ly/mJNXE9 >> >> x,y results of different noise values in dBm, using apcalc: >> >> mcgrof@tux ~ $ calc >> C-style arbitrary precision calculator (version 2.12.3.3) >> Calc is open software. For license details type:  help copyright >> [Type "exit" to exit, or "help" for help.] >> >> ; define f(x) = 1.1^(x+110) >> f(x) defined >> >> ; f(-130) >>        ~0.14864362802414368640 >> ; f(-120) >>        ~0.38554328942953174736 >> ; f(-119) >>        ~0.42409761837248492210 >> ; f(-118) >>        ~0.46650738020973341431 >> ; f(-117) >>        ~0.51315811823070675574 >> ; f(-116) >>        ~0.56447393005377743132 >> ; f(-115) >>        ~0.62092132305915517445 >> ; f(-114) >>        ~0.68301345536507069189 >> ; f(-113) >>        ~0.75131480090157776108 >> ; f(-112) >>        ~0.82644628099173553719 >> ; f(-111) >>        ~0.90909090909090909091 >> ; f(-110) >>        1 >> ; f(-109) >>        1.1 >> ; f(-108) >>        1.21 >> ; f(-107) >>        1.331 >> >> So then, we'd use a frequency for initiating beaconing (AP, Mesh, P2P) >> which uses the lowest value from the following computation: >> >> (busy time - tx time) / (active time - tx time) * 1.1^(noise + 110) >> >> The 1.1 factor can be modified more accurately to represent the >> exponential factor of how noise should affect interference decisions, >> the 110 value here can be modified for any other arbitrary value we >> find as representative of a regular noise value from a simple AP on >> the frequency we are observing, my assumption here was -110 dBm. > > -110 dBm is not a real noise value. It's an unrealistic, ath9k-specific > value. I have a patch that changes ath9k to make noise and signal strength > values more realistic, and I'll submit it soon, as soon as I've made it a > bit more precise. Nice. As I noted though this value is arbitrary for now, we can change it at will. Any other feedback? If not I'll start hacking on it. Luis