On Wed, Feb 20, 2013 at 11:55:14PM +0400, Georgiewskiy Yuriy wrote: > i think yes, but i dont understand what exactly do this signal processing and why it needed, > i find the source of this changes - http://www.spinics.net/lists/linux-wireless/msg35905.html, > but there is no explain too. Yeah, me neither, but just going on the macros: > +#define ATH_RSSI_IN(x) (ATH_EP_MUL((x), > ATH_RSSI_EP_MULTIPLIER)) That takes the value read from the card, and multiplies it by ATH_RSSI_EP_MULTIPLIER, which is 1<<7. So now it's in fixed-point with a 6-bit fractional part. > +#define ATH_LPF_RSSI(x, y, len) \ > + ((x != ATH_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) > : (y)) Low pass filter, aka moving average. So rssi values are first moved into fixed point range, some averaging is done on the samples, presumably to reduce the variance, then the result is rounded back into non-fractional units. ((x + m/2)/m is the fixed point version of int(x + 0.5) if 'm' is the representation of 1.0 in fixed point. -- Bob Copeland %% www.bobcopeland.com -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html