diff options
author | Andrey Borzenkov <arvidjaar@mail.ru> | 2008-11-15 09:15:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-26 09:47:18 -0500 |
commit | f941f8590c06c6b1a77c4b5a5df59f39a3c7d1e9 (patch) | |
tree | 75613cb3695f75ef7c83201caf40dcefff75ea67 /drivers/net/wireless | |
parent | 8eb41c93685318d177276d1819915571aca7ebb1 (diff) |
orinoco: indicate it is using dBm in wireless_stats and spy
Since WE7 /proc/net/wireless checks whether level and noise are in dBm
and shows them accordingly. Indicate that we return signal and noice
levels in dBm.
Before:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
eth1: 0000 65. 219. 165. 0 0 148 41 0 0
After:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
eth1: 0000 65. -37. -91. 0 0 0 0 0 0
While at it, replace raw numbers with appropriate macro.
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c index fd9263980d69..7ec038ac1c36 100644 --- a/drivers/net/wireless/orinoco/orinoco.c +++ b/drivers/net/wireless/orinoco/orinoco.c | |||
@@ -809,7 +809,7 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev) | |||
809 | wstats->qual.qual = (int)le16_to_cpu(cq.qual); | 809 | wstats->qual.qual = (int)le16_to_cpu(cq.qual); |
810 | wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95; | 810 | wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95; |
811 | wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95; | 811 | wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95; |
812 | wstats->qual.updated = 7; | 812 | wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; |
813 | } | 813 | } |
814 | } | 814 | } |
815 | 815 | ||
@@ -1168,7 +1168,7 @@ static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, | |||
1168 | wstats.level = level - 0x95; | 1168 | wstats.level = level - 0x95; |
1169 | wstats.noise = noise - 0x95; | 1169 | wstats.noise = noise - 0x95; |
1170 | wstats.qual = (level > noise) ? (level - noise) : 0; | 1170 | wstats.qual = (level > noise) ? (level - noise) : 0; |
1171 | wstats.updated = 7; | 1171 | wstats.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; |
1172 | /* Update spy records */ | 1172 | /* Update spy records */ |
1173 | wireless_spy_update(dev, mac, &wstats); | 1173 | wireless_spy_update(dev, mac, &wstats); |
1174 | } | 1174 | } |