libiwinfo: properly detect open network reported by wpa_supplicant

This commit is contained in:
Jo-Philipp Wich 2010-11-30 19:57:38 +00:00
parent ced440f886
commit c956319f01
2 changed files with 6 additions and 6 deletions

View file

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=libiwinfo PKG_NAME:=libiwinfo
PKG_RELEASE:=11 PKG_RELEASE:=12
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

View file

@ -1173,11 +1173,7 @@ int nl80211_get_txpwrlist(const char *ifname, char *buf, int *len)
static void nl80211_get_scancrypto(const char *spec, static void nl80211_get_scancrypto(const char *spec,
struct iwinfo_crypto_entry *c) struct iwinfo_crypto_entry *c)
{ {
if( strstr(spec, "OPEN") ) if( strstr(spec, "WPA") || strstr(spec, "WEP") )
{
c->enabled = 0;
}
else
{ {
c->enabled = 1; c->enabled = 1;
@ -1218,6 +1214,10 @@ static void nl80211_get_scancrypto(const char *spec,
c->group_ciphers = c->pair_ciphers; c->group_ciphers = c->pair_ciphers;
} }
else
{
c->enabled = 0;
}
} }
int nl80211_get_scanlist(const char *ifname, char *buf, int *len) int nl80211_get_scanlist(const char *ifname, char *buf, int *len)