aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-02-18 11:40:38 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-18 11:40:38 (GMT)
commit7c2849d2a09c1ba3cbc2247f08baad2e929464c1 (patch)
tree3fdec0f0cdc16ce2234eaa6a2b24fbe44ffd837b /src/drivers/driver_wext.c
parentd173df5232b420e8e41d3fbd9750f34f75daa758 (diff)
downloadhostap-7c2849d2a09c1ba3cbc2247f08baad2e929464c1.zip
hostap-7c2849d2a09c1ba3cbc2247f08baad2e929464c1.tar.gz
hostap-7c2849d2a09c1ba3cbc2247f08baad2e929464c1.tar.bz2
Add BSS flags to scan results to indicate signal quality validity
These flags are used to mark which values (level, noise, qual) are invalid (not available from the driver) and whether level is using dBm. D-Bus interface will now only report the values that were available.
Diffstat (limited to 'src/drivers/driver_wext.c')
-rw-r--r--src/drivers/driver_wext.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 1c9105b..e6242da 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1267,6 +1267,14 @@ static void wext_get_scan_qual(struct iw_event *iwe,
res->res.qual = iwe->u.qual.qual;
res->res.noise = iwe->u.qual.noise;
res->res.level = iwe->u.qual.level;
+ if (iwe->u.qual.updated & IW_QUAL_QUAL_INVALID)
+ res->res.flags |= WPA_SCAN_QUAL_INVALID;
+ if (iwe->u.qual.updated & IW_QUAL_LEVEL_INVALID)
+ res->res.flags |= WPA_SCAN_LEVEL_INVALID;
+ if (iwe->u.qual.updated & IW_QUAL_NOISE_INVALID)
+ res->res.flags |= WPA_SCAN_NOISE_INVALID;
+ if (iwe->u.qual.updated & IW_QUAL_DBM)
+ res->res.flags |= WPA_SCAN_LEVEL_DBM;
}