Search Linux Wireless

Re: [PATCH] wireless: sysfs was displaying different values for level and noise than procfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2008-11-15 at 18:31 +0300, Andrey Borzenkov wrote:
> Subject: [PATCH] wireless: sysfs was displaying different values for level and noise than procfs
> From: Andrey Borzenkov <arvidjaar@xxxxxxx>
> 
> /proc/net/wireless asjusts display of signal and noise level depending on
> whether units are percentage or dBm. Use the same format in sysfs. This
> makes it easy to know unit - below zero is dBm, above zero is percent.

I've seen received power up to 3 dBm.  The AP was using an amplifier
(it's specialized hardware), and it's possible that the card on the
station side was exaggerating the signal.  However, the data we report
should not need any guesswork to be interpreted.  It may be parsed by
userspace software.

Receiving 1 mW out of 200 mW is not impossible in some antenna
configurations even with consumer devices.

> Before:
> {pts/1}% cat /sys/class/net/eth1/wireless/level
> 203
> {pts/1}% cat /sys/class/net/eth1/wireless/noise
> 166

> +	return sprintf(buf, format_string, (__s32)iw->field -		\
> +			((iw->qual.updated & IW_QUAL_DBM) ? 0x100 : 0)); \

I think non-dBm data should be shown in a special format: "203/255"
where 255 is the maximal value, and the dBm data should be shown as
numbers: "-48".  This way, we encourage use of dBm data by making it
easier to parse.

-- 
Regards,
Pavel Roskin
--
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux