From c956319f01be752621673e5e190efe84d572039e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 30 Nov 2010 19:57:38 +0000 Subject: libiwinfo: properly detect open network reported by wpa_supplicant --- contrib/package/iwinfo/Makefile | 2 +- contrib/package/iwinfo/src/iwinfo_nl80211.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib/package') diff --git a/contrib/package/iwinfo/Makefile b/contrib/package/iwinfo/Makefile index c745be71e..e9edc2ccc 100644 --- a/contrib/package/iwinfo/Makefile +++ b/contrib/package/iwinfo/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiwinfo -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/contrib/package/iwinfo/src/iwinfo_nl80211.c b/contrib/package/iwinfo/src/iwinfo_nl80211.c index 52b90122f..4868db10e 100644 --- a/contrib/package/iwinfo/src/iwinfo_nl80211.c +++ b/contrib/package/iwinfo/src/iwinfo_nl80211.c @@ -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) -- cgit v1.2.3