mirror of https://github.com/hak5/openwrt.git
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> SVN-Revision: 41826lede-17.01
parent
ae50480d77
commit
833820dc8b
|
@ -7,7 +7,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libiwinfo
|
PKG_NAME:=libiwinfo
|
||||||
PKG_RELEASE:=49
|
PKG_RELEASE:=50
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
PKG_CONFIG_DEPENDS := \
|
PKG_CONFIG_DEPENDS := \
|
||||||
|
|
|
@ -2003,8 +2003,7 @@ static int nl80211_get_scanlist(const char *ifname, char *buf, int *len)
|
||||||
if (!(res = nl80211_ifadd(ifname)))
|
if (!(res = nl80211_ifadd(ifname)))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!iwinfo_ifmac(res))
|
iwinfo_ifmac(res);
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* if we can take the new interface up, the driver supports an
|
/* if we can take the new interface up, the driver supports an
|
||||||
* additional interface and there's no need to tear down the ap */
|
* additional interface and there's no need to tear down the ap */
|
||||||
|
|
|
@ -113,6 +113,7 @@ int iwinfo_ifmac(const char *ifname)
|
||||||
if (iwinfo_ioctl(SIOCGIFHWADDR, &ifr))
|
if (iwinfo_ioctl(SIOCGIFHWADDR, &ifr))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
ifr.ifr_hwaddr.sa_data[0] |= 0x02;
|
||||||
ifr.ifr_hwaddr.sa_data[1]++;
|
ifr.ifr_hwaddr.sa_data[1]++;
|
||||||
ifr.ifr_hwaddr.sa_data[2]++;
|
ifr.ifr_hwaddr.sa_data[2]++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue