[patch] wext stats in dbm
richard <[email protected]> Tue, 02 Jan 2007 15:10:44 +0000
| Newsgroups | gmane.linux.linux-wlan.user |
|---|---|
| Message-ID | <[email protected]> |
--=-Cxze/KWUVQD7/9d62FPX Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, wireless_ext 19 defines a new flag IW_QUAL_DBM for wstats -- as our stats are measured in dbm this patch sets it. This lets iwconfig & /proc/net/wireless display more sensible results. with this patch /proc/net/wireless shows level -58 noise -95 Cheers Richard Index: src/p80211/p80211wext.c =================================================================== --- src/p80211/p80211wext.c (revision 1805) +++ src/p80211/p80211wext.c (working copy) @@ -236,7 +236,12 @@ wstats->qual.level = quality.level.data; /* instant signal level */ wstats->qual.noise = quality.noise.data; /* instant noise level */ +#if WIRELESS_EXT > 18 + wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; +#else wstats->qual.updated = 7; +#endif + wstats->discard.code = wlandev->rx.decrypt_err; wstats->discard.nwid = 0; wstats->discard.misc = 0; --=-Cxze/KWUVQD7/9d62FPX Content-Disposition: attachment; filename=wext_qual_dbm.patch Content-Type: text/x-patch; name=wext_qual_dbm.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: src/p80211/p80211wext.c =================================================================== --- src/p80211/p80211wext.c (revision 1805) +++ src/p80211/p80211wext.c (working copy) @@ -236,7 +236,12 @@ wstats->qual.level = quality.level.data; /* instant signal level */ wstats->qual.noise = quality.noise.data; /* instant noise level */ +#if WIRELESS_EXT > 18 + wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; +#else wstats->qual.updated = 7; +#endif + wstats->discard.code = wlandev->rx.decrypt_err; wstats->discard.nwid = 0; wstats->discard.misc = 0; --=-Cxze/KWUVQD7/9d62FPX Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-wlan-user mailing list [email protected] http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-user --=-Cxze/KWUVQD7/9d62FPX--