lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 3/3] nl80211/mac80211: Report signal average
From
Date
On Fri, 2010-11-19 at 18:07 +0900, Bruno Randolf wrote:

> Hmm, maybe I suck in mathemathics, but I don't see a way to do that given the
> formula:
>
> (((internal * (weight - 1)) + (val * factor)) / weight

If you assume weight == 2^n, you can write that as:

(((internal << n) - internal) + (val * factor)) >> n




\
 
 \ /
  Last update: 2010-11-19 13:19    [W:0.205 / U:0.600 seconds]
©2003-2014 Jasper Spaans. Advertise on this site