#
-# Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
+# Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
#
# This is free software, licensed under the GPL 2 license.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libiwinfo
-PKG_RELEASE:=13
+PKG_RELEASE:=14
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-IWINFO_BACKENDS = $(if $(BACKENDS),$(BACKENDS),madwifi nl80211)
+IWINFO_BACKENDS = $(BACKENDS)
IWINFO_LDFLAGS = $(LDFLAGS) -shared -llua
IWINFO_CFLAGS = $(CFLAGS) -std=gnu99 -fstrict-aliasing
IWINFO_SO = iwinfo.so
case 3:
sprintf(desc, "mixed WPA/WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
case 2:
sprintf(desc, "WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
case 1:
sprintf(desc, "WPA %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
}
}
if( madwifi_wrq(&wrq, ifname, SIOCGIWENCODE, keybuf, sizeof(keybuf)) < 0 )
return -1;
+#if 0
/* Have any encryption? */
if( (wrq.u.data.flags & IW_ENCODE_DISABLED) || (wrq.u.data.length == 0) )
return 0;
+#endif
/* Save key len */
key_len = wrq.u.data.length;
if( c->wpa_version && ciphers & (1 << IEEE80211_CIPHER_CKIP) )
c->pair_ciphers |= IWINFO_CIPHER_CKIP;
- if( ciphers & (1 << IEEE80211_CIPHER_WEP) )
+ if( !c->pair_ciphers && ciphers & (1 << IEEE80211_CIPHER_WEP) )
{
switch(key_len) {
case 13: