diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-07 05:38:09 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-07 05:38:09 +0000 |
commit | b93fe699073f9c51ae555235b0d37f056d048528 (patch) | |
tree | 536b25988a3c2fd24004a0f4c28b434f2dad5187 /contrib/package | |
parent | 3a3b9ed806aab3da2264e8c641e3a5ef7be05a9c (diff) |
libiwinfo: properly detect wep and unencrypted wifi iface state on madwifi
Diffstat (limited to 'contrib/package')
-rw-r--r-- | contrib/package/iwinfo/src/iwinfo_madwifi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/package/iwinfo/src/iwinfo_madwifi.c b/contrib/package/iwinfo/src/iwinfo_madwifi.c index 54a77cd4dc..be89978999 100644 --- a/contrib/package/iwinfo/src/iwinfo_madwifi.c +++ b/contrib/package/iwinfo/src/iwinfo_madwifi.c @@ -641,6 +641,9 @@ int madwifi_get_encryption(const char *ifname, char *buf) c->pair_ciphers |= IWINFO_CIPHER_WEP40; break; + case 0: + break; + default: c->pair_ciphers = IWINFO_CIPHER_WEP40 | IWINFO_CIPHER_WEP104; @@ -699,7 +702,7 @@ int madwifi_get_encryption(const char *ifname, char *buf) } } - c->enabled = (c->wpa_version || c->auth_algs) ? 1 : 0; + c->enabled = (c->wpa_version || (c->auth_algs && c->pair_ciphers)) ? 1 : 0; return 0; } |