libiwinfo: properly detect open network reported by wpa_supplicant
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 30 Nov 2010 19:57:38 +0000 (19:57 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 30 Nov 2010 19:57:38 +0000 (19:57 +0000)
contrib/package/iwinfo/Makefile
contrib/package/iwinfo/src/iwinfo_nl80211.c

index c745be71eb3eb36f61f3fe8915cf4812615245f1..e9edc2cccac4b5f2f08ece64e986060409f4dfb5 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
index 52b90122f6dd2bed7fef89517097f426e57c0dce..4868db10e68821d6bad7f3ddaaf83e070c8e4e6a 100644 (file)
@@ -1173,11 +1173,7 @@ int nl80211_get_txpwrlist(const char *ifname, char *buf, int *len)
 static void nl80211_get_scancrypto(const char *spec,
        struct iwinfo_crypto_entry *c)
 {
-       if( strstr(spec, "OPEN") )
-       {
-               c->enabled = 0;
-       }
-       else
+       if( strstr(spec, "WPA") || strstr(spec, "WEP") )
        {
                c->enabled = 1;
 
@@ -1218,6 +1214,10 @@ static void nl80211_get_scancrypto(const char *spec,
 
                c->group_ciphers = c->pair_ciphers;
        }
+       else
+       {
+               c->enabled = 0;
+       }
 }
 
 int nl80211_get_scanlist(const char *ifname, char *buf, int *len)