linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 31-rc3-mmotm0716 - wonky wireless statistics..
@ 2009-07-28 21:01 Valdis.Kletnieks
  2009-07-29  1:31 ` Zhu Yi
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis.Kletnieks @ 2009-07-28 21:01 UTC (permalink / raw)
  To: Andrew Morton, Zhu Yi; +Cc: linux-kernel, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

Dell Latitude D820 laptop, lspci reports the network card as:

0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Netwo           rk Connection (rev 02)

iwlwifi driver in use, card associated via wpa_supplicant but not being
actively used

# iwconfig
wlan0     IEEE 802.11abg  ESSID:"VT-Wireless"  
          Mode:Managed  Frequency:2.447 GHz  Access Point: 00:11:20:A4:4C:10   
          Bit Rate=54 Mb/s   Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:<lopped out> [2]
          Link Quality=62/70  Signal level=-48 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
# cat /proc/net/wireless
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
 wlan0: 0000   63.  -47.  -256        0      0      0      0      0        0
 wlan1: 0000    0     0     0        0      0      0      0      0        0
 wlan2: 0000    0     0     0        0      0      0      0      0        0

Where did that -256 for "noise" come from?  It ends up confusing the
gkrellm-wifi plugin, it reports a S/N of 219dB ;)



[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 31-rc3-mmotm0716 - wonky wireless statistics..
  2009-07-28 21:01 31-rc3-mmotm0716 - wonky wireless statistics Valdis.Kletnieks
@ 2009-07-29  1:31 ` Zhu Yi
  2009-07-29  7:19   ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yi @ 2009-07-29  1:31 UTC (permalink / raw)
  To: Valdis.Kletnieks, Johannes Berg
  Cc: Andrew Morton, linux-kernel, linux-wireless

On Wed, 2009-07-29 at 05:01 +0800, Valdis.Kletnieks@vt.edu wrote:
> Dell Latitude D820 laptop, lspci reports the network card as:
> 
> 0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Netwo           rk Connection (rev 02)
> 
> iwlwifi driver in use, card associated via wpa_supplicant but not being
> actively used
> 
> # iwconfig
> wlan0     IEEE 802.11abg  ESSID:"VT-Wireless"  
>           Mode:Managed  Frequency:2.447 GHz  Access Point: 00:11:20:A4:4C:10   
>           Bit Rate=54 Mb/s   Tx-Power=15 dBm   
>           Retry  long limit:7   RTS thr:off   Fragment thr:off
>           Encryption key:<lopped out> [2]
>           Link Quality=62/70  Signal level=-48 dBm  
>           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
>           Tx excessive retries:0  Invalid misc:0   Missed beacon:0
> # cat /proc/net/wireless
> Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
>  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
>  wlan0: 0000   63.  -47.  -256        0      0      0      0      0        0
>  wlan1: 0000    0     0     0        0      0      0      0      0        0
>  wlan2: 0000    0     0     0        0      0      0      0      0        0
> 
> Where did that -256 for "noise" come from?  It ends up confusing the
> gkrellm-wifi plugin, it reports a S/N of 219dB ;)

This should be related to http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=fdb897ea5c77836f890033d563336ab0c94c9222

But I don't think this is an ABI broken. User space should parse the
trailing '.' to see if a field is updated or not because there are cards
not capable to report hardware noise level anyway. Johannes?

Thanks,
-yi


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 31-rc3-mmotm0716 - wonky wireless statistics..
  2009-07-29  1:31 ` Zhu Yi
@ 2009-07-29  7:19   ` Johannes Berg
  2009-08-04  3:40     ` Valdis.Kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-07-29  7:19 UTC (permalink / raw)
  To: Zhu Yi; +Cc: Valdis.Kletnieks, Andrew Morton, linux-kernel, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

On Wed, 2009-07-29 at 09:31 +0800, Zhu Yi wrote:

> > # cat /proc/net/wireless
> > Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
> >  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
> >  wlan0: 0000   63.  -47.  -256        0      0      0      0      0        0
> >  wlan1: 0000    0     0     0        0      0      0      0      0        0
> >  wlan2: 0000    0     0     0        0      0      0      0      0        0
> > 
> > Where did that -256 for "noise" come from?  It ends up confusing the
> > gkrellm-wifi plugin, it reports a S/N of 219dB ;)
> 
> This should be related to http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=fdb897ea5c77836f890033d563336ab0c94c9222
> 
> But I don't think this is an ABI broken. User space should parse the
> trailing '.' to see if a field is updated or not because there are cards
> not capable to report hardware noise level anyway. Johannes?

So I had to look at the code to figure out wtf is going on.

Then the value shown is calculated as:
	((__s32) stats->qual.noise) - ((stats->qual.updated & IW_QUAL_DBM) ? 0x100 : 0)

and since we have dBm for the signal strength (and dBm is "all or
nothing") you get -256 since we don't fill noise right now.

However, it goes on like this:
	stats->qual.updated & IW_QUAL_NOISE_UPDATED ? '.' : ' '

so you're right -- the tool shouldn't be using the value unless followed
by a dot (".").

Thus, your analysis is correct as far as I can tell -- it's a userspace
bug and your userspace just happened to work correctly with this card,
but would have been broken with almost all other wireless cards.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 31-rc3-mmotm0716 - wonky wireless statistics..
  2009-07-29  7:19   ` Johannes Berg
@ 2009-08-04  3:40     ` Valdis.Kletnieks
  0 siblings, 0 replies; 4+ messages in thread
From: Valdis.Kletnieks @ 2009-08-04  3:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Zhu Yi, Andrew Morton, linux-kernel, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

On Wed, 29 Jul 2009 09:19:12 +0200, Johannes Berg said:

> > > # cat /proc/net/wireless
> > > Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
> > >  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
> > >  wlan0: 0000   63.  -47.  -256        0      0      0      0      0
> > >  wlan1: 0000    0     0     0        0      0      0      0      0
> > >  wlan2: 0000    0     0     0        0      0      0      0      0

> and since we have dBm for the signal strength (and dBm is "all or
> nothing") you get -256 since we don't fill noise right now.
> 
> However, it goes on like this:
> 	stats->qual.updated & IW_QUAL_NOISE_UPDATED ? '.' : ' '
> 
> so you're right -- the tool shouldn't be using the value unless followed
> by a dot (".").

OK, went back and checked a -mmotm0702 kernel, and there I see:

 cat /proc/net/wireless
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
 wlan0: 0000   64.  -46.  -127.       0      0      0      0      0        0
 wlan1: 0000    0     0     0        0      0      0      0      0        0
 wlan2: 0000    0     0     0        0      0      0      0      0        0

so yes, it appears that the userspace program (gkrellm-wifi) is failing to
notice the lack of a trailing '.'.  Looks like I need to write a patch and push
it upstream, make it do something sensible with the S/N ratio when N is
missing. Too bad probably no easy way to compute an estimate based on the level
and link-quality values....


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-04  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28 21:01 31-rc3-mmotm0716 - wonky wireless statistics Valdis.Kletnieks
2009-07-29  1:31 ` Zhu Yi
2009-07-29  7:19   ` Johannes Berg
2009-08-04  3:40     ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).