diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-07-25 14:11:50 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-07-25 14:11:50 +0000 |
commit | e9fa0943ebef2db0e912bd6980c67c93fb74c6ac (patch) | |
tree | c7a6189efe48b7a4a1b27345db29465397b9b200 | |
parent | 5a4fb3a6fa1a0365ce1983b2e616683b1b44007b (diff) | |
download | master-187ad058-e9fa0943ebef2db0e912bd6980c67c93fb74c6ac.tar.gz master-187ad058-e9fa0943ebef2db0e912bd6980c67c93fb74c6ac.tar.bz2 master-187ad058-e9fa0943ebef2db0e912bd6980c67c93fb74c6ac.zip |
iwinfo: continue scanning even if temporary mac cannot be changed
So far iwinfo aborted a wifi scan attempt if the mac of the spawned
interface could not be changed. Change the code to try anyway - this
should fix wifi scanning on RaLink devices.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41826 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/utils/iwinfo/Makefile | 2 | ||||
-rw-r--r-- | package/network/utils/iwinfo/src/iwinfo_nl80211.c | 3 | ||||
-rw-r--r-- | package/network/utils/iwinfo/src/iwinfo_utils.c | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 9efb9c974c..e4ee73a112 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiwinfo -PKG_RELEASE:=49 +PKG_RELEASE:=50 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_CONFIG_DEPENDS := \ diff --git a/package/network/utils/iwinfo/src/iwinfo_nl80211.c b/package/network/utils/iwinfo/src/iwinfo_nl80211.c index 4a52d5ca8d..c8b167b32a 100644 --- a/package/network/utils/iwinfo/src/iwinfo_nl80211.c +++ b/package/network/utils/iwinfo/src/iwinfo_nl80211.c @@ -2003,8 +2003,7 @@ static int nl80211_get_scanlist(const char *ifname, char *buf, int *len) if (!(res = nl80211_ifadd(ifname))) goto out; - if (!iwinfo_ifmac(res)) - goto out; + iwinfo_ifmac(res); /* if we can take the new interface up, the driver supports an * additional interface and there's no need to tear down the ap */ diff --git a/package/network/utils/iwinfo/src/iwinfo_utils.c b/package/network/utils/iwinfo/src/iwinfo_utils.c index dd49303f8a..1702ce88f6 100644 --- a/package/network/utils/iwinfo/src/iwinfo_utils.c +++ b/package/network/utils/iwinfo/src/iwinfo_utils.c @@ -113,6 +113,7 @@ int iwinfo_ifmac(const char *ifname) if (iwinfo_ioctl(SIOCGIFHWADDR, &ifr)) return 0; + ifr.ifr_hwaddr.sa_data[0] |= 0x02; ifr.ifr_hwaddr.sa_data[1]++; ifr.ifr_hwaddr.sa_data[2]++; |