summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/iwinfo
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-27 16:32:12 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-27 16:32:12 +0000
commit37ac71b816b395e4ed9a16b02fa04eafea81a6a9 (patch)
tree6ef170f0baf34558357f967f8bb981b73bc1c999 /contrib/package/iwinfo
parente8490c385facaca9ceb2b15303f3ebc3a0b3c722 (diff)
contrib: remove hard dependency on libiwinfo, madwifi scan fixes
Diffstat (limited to 'contrib/package/iwinfo')
-rw-r--r--contrib/package/iwinfo/Makefile3
-rw-r--r--contrib/package/iwinfo/src/iwinfo_madwifi.c19
2 files changed, 20 insertions, 2 deletions
diff --git a/contrib/package/iwinfo/Makefile b/contrib/package/iwinfo/Makefile
index 35ea6192e..be35d3b60 100644
--- a/contrib/package/iwinfo/Makefile
+++ b/contrib/package/iwinfo/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libiwinfo
-PKG_RELEASE:=10
+PKG_RELEASE:=11
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -20,6 +20,7 @@ define Package/libiwinfo
SUBMENU:=Libraries
TITLE:=Generalized Wireless Information Library (iwinfo)
DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny +liblua +lua
+ DEFAULT:=PACKAGE_luci-lib-core
endef
define Package/libiwinfo/description
diff --git a/contrib/package/iwinfo/src/iwinfo_madwifi.c b/contrib/package/iwinfo/src/iwinfo_madwifi.c
index 3572f0011..a6070132b 100644
--- a/contrib/package/iwinfo/src/iwinfo_madwifi.c
+++ b/contrib/package/iwinfo/src/iwinfo_madwifi.c
@@ -292,14 +292,23 @@ static char * madwifi_ifadd(const char *ifname)
snprintf(nif, sizeof(nif), "tmp.%s", ifname);
strncpy(cp.icp_name, nif, IFNAMSIZ);
- cp.icp_opmode = IEEE80211_M_MONITOR;
+ cp.icp_opmode = IEEE80211_M_STA;
cp.icp_flags = IEEE80211_CLONE_BSSID;
strncpy(ifr.ifr_name, wifidev, IFNAMSIZ);
ifr.ifr_data = (void *)&cp;
if( !iwinfo_ioctl(SIOC80211IFCREATE, &ifr) )
+ {
return nif;
+ }
+ else
+ {
+ cp.icp_opmode = IEEE80211_M_MONITOR;
+
+ if( !iwinfo_ioctl(SIOC80211IFCREATE, &ifr) )
+ return nif;
+ }
}
return NULL;
@@ -778,7 +787,15 @@ int madwifi_get_scanlist(const char *ifname, char *buf, int *len)
if( (res = madwifi_ifadd(ifname)) != NULL )
{
if( iwinfo_ifup(res) )
+ {
+ wext_get_scanlist(res, buf, len);
+ sleep(1);
+
+ wext_get_scanlist(res, buf, len);
+ sleep(1);
+
ret = wext_get_scanlist(res, buf, len);
+ }
iwinfo_ifdown(res);
madwifi_ifdel(res);