On 2015/01/09 20:48, Stefan Sperling wrote: > On Fri, Jan 09, 2015 at 03:52:44PM +0000, Stuart Henderson wrote: > > This has been bugging me for ages but I forgot about it for quite a > > while (mostly because iwn scanning was broken on my laptop for ages). > > RSSI is a signed value, but various places are storing it unsigned, > > in particular ifconfig prints it that way (so the displayed strength > > is unfeasibly large; realistic values are maybe -40 [very strong > > signal] to -90 or so). > > > > Diff below fixes things for ifconfig and doesn't affect things used > > in other places in the kernel. Sample output from iwn scan below (and > > the values are sensible). > > > > OK? > > OK. This aligns ifconfig output with what my wifi textbook says about > dBm and rssi. Before this diff ifconfig reported 196dB for some wifi > networks around here which (if I got the math right) corresponds to > 60000000000000000 Watts of tx power which, hmm, exceeds regulatory limits. > > Can you switch "dB" to "dBm" as well?
Yes, will do. Just went to check what a ral(4) does; this diff makes no difference there because the ral driver uses positive values for everything, i.e. reported values of 58dBm, 60dBm, 70dBm etc. (the absolute values look about right if they had a "-" in front of them).
