From: Andrey Borzenkov <arvidjaar@mail.ru>
To: orinoco-devel@lists.sourceforge.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] orinoco: indicate it is using dBm in wireless_stats and spy
Date: Sat, 15 Nov 2008 17:15:09 +0300 [thread overview]
Message-ID: <200811151715.17150.arvidjaar@mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]
Subject: [PATCH] orinoco: indicate it is using dBm in wireless_stats and spy
From: Andrey Borzenkov <arvidjaar@mail.ru>
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>
---
drivers/net/wireless/orinoco.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index bc4f5a2..5038b76 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -821,7 +821,7 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
wstats->qual.qual = (int)le16_to_cpu(cq.qual);
wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95;
wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95;
- wstats->qual.updated = 7;
+ wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
}
}
@@ -1179,7 +1179,7 @@ static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac,
wstats.level = level - 0x95;
wstats.noise = noise - 0x95;
wstats.qual = (level > noise) ? (level - noise) : 0;
- wstats.updated = 7;
+ wstats.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
/* Update spy records */
wireless_spy_update(dev, mac, &wstats);
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2008-11-15 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-15 14:15 Andrey Borzenkov [this message]
2008-11-19 22:12 ` [PATCH] orinoco: indicate it is using dBm in wireless_stats and spy Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811151715.17150.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-wireless@vger.kernel.org \
--cc=orinoco-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).