/proc/net/wireless vs. iwconfig

Kai Timmer email at kait.de
Sun Apr 26 15:26:37 CEST 2009

I noticed is that /proc/net/wireless shows other values than iwconfig does.

$ cat /proc/net/wireless
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
eth1: 0000    0     0     0        0      0      0      0      0        0

which looks like there is not network. But in fact there is, as
iwconfig shows correctly:
$ iwconfig
eth1    AR6000 802.11g  ESSID:"adhoc"
          Mode:Ad-Hoc  Frequency:2.457 GHz  Cell: 52:73:CF:8F:CE:5B
          Bit Rate=1 Mb/s   Tx-Power=15 dBm   Sensitivity=0/3
          Encryption key:off
          Power Management:off
          Link Quality:195/94  Signal level:-156 dBm  Noise level:-98 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:18  Invalid misc:0   Missed beacon:0

This is in a ad-hoc network, but the same happens when i connect to a
access point. I looked into the source and it looks like this
if ((ar->arWmiReady == FALSE)  || (in_atomic())

(line 2104 in ar6000_drv.c) is always true and because of that the
values printed in /proc/net/wireless are always defaulted to 0.
Why is that, and where does iwconfig get it's data from?

Kai Timmer
Email : email at kait.de
Jabber: kai at kait.de

More information about the devel mailing list