Fix signal strength calculation when quality is not provided
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 19 Dec 2009 04:26:01 +0000 (20:26 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 19 Dec 2009 04:26:01 +0000 (20:26 -0800)
plugins/supplicant.c

index 906516139b7e22da7bbc50297a0adf6c8a24b7a4..31255c13296687d5bfd04711a6bf0f2e841bbab8 100644 (file)
@@ -1211,7 +1211,7 @@ static void extract_capabilites(DBusMessageIter *value,
 static unsigned char calculate_strength(struct supplicant_task *task,
                                        struct supplicant_result *result)
 {
-       if (task->range->max_qual.qual == 0) {
+       if (result->quality == -1 || task->range->max_qual.qual == 0) {
                unsigned char strength;
 
                if (result->level > 0)