[PATCH] libertas: WE quality fixes
Dan Williams
dcbw at redhat.com
Tue Oct 3 12:08:41 EDT 2006
Set IW_QUAL_DBM on updated quality values, and use real noise value to
calculate quality (fixes /proc/net/wireless display too).
Signed-off-by: Dan Williams <dcbw at redhat.com>
diff --git a/drivers/net/wireless/libertas/wlan_wext.c b/drivers/net/wireless/libertas/wlan_wext.c
index fbe370d..e03e57a 100644
--- a/drivers/net/wireless/libertas/wlan_wext.c
+++ b/drivers/net/wireless/libertas/wlan_wext.c
@@ -2108,7 +2108,7 @@ static struct iw_statistics *wlan_get_wi
PRINTM(INFO, "Signal Level = %#x\n", priv->wstats.qual.level);
PRINTM(INFO, "Noise = %#x\n", priv->wstats.qual.noise);
- rssi = priv->wstats.qual.level - MRVDRV_NF_DEFAULT_SCAN_VALUE;
+ rssi = priv->wstats.qual.level - priv->wstats.qual.noise;
if (rssi < 15)
rssi_qual = rssi * POOR / 10;
else if (rssi < 20)
@@ -2152,7 +2152,7 @@ static struct iw_statistics *wlan_get_wi
/* Calculate quality */
priv->wstats.qual.qual = max(quality, (u32)100);
- priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED;
+ priv->wstats.qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
stats_valid = 1;
out:
More information about the libertas-dev
mailing list