libiwinfo: fix detection of wep encryption and open networks in nl80211 backend
[project/luci.git] / contrib / package / iwinfo / src / iwinfo_nl80211.c
index da8d5bb..a27ed02 100644 (file)
@@ -1028,7 +1028,7 @@ int nl80211_get_encryption(const char *ifname, char *buf)
                }
 
                c->group_ciphers = c->pair_ciphers;
-               c->enabled = (c->auth_algs || c->auth_suites) ? 1 : 0;
+               c->enabled = (c->wpa_version || c->pair_ciphers) ? 1 : 0;
 
                return 0;
        }