Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
68d42e7f79
@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|||||||
@ -122,6 +122,14 @@ function iface_config_macaddr_list(config)
|
|||||||
return macaddr_list;
|
return macaddr_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function iface_update_supplicant_macaddr(phy, config)
|
||||||
|
{
|
||||||
|
let macaddr_list = [];
|
||||||
|
for (let i = 0; i < length(config.bss); i++)
|
||||||
|
push(macaddr_list, config.bss[i].bssid);
|
||||||
|
ubus.call("wpa_supplicant", "phy_set_macaddr_list", { phy: phy, macaddr: macaddr_list });
|
||||||
|
}
|
||||||
|
|
||||||
function iface_restart(phydev, config, old_config)
|
function iface_restart(phydev, config, old_config)
|
||||||
{
|
{
|
||||||
let phy = phydev.name;
|
let phy = phydev.name;
|
||||||
@ -142,6 +150,8 @@ function iface_restart(phydev, config, old_config)
|
|||||||
bss.bssid = phydev.macaddr_next();
|
bss.bssid = phydev.macaddr_next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iface_update_supplicant_macaddr(phy, config);
|
||||||
|
|
||||||
let bss = config.bss[0];
|
let bss = config.bss[0];
|
||||||
let err = wdev_create(phy, bss.ifname, { mode: "ap" });
|
let err = wdev_create(phy, bss.ifname, { mode: "ap" });
|
||||||
if (err)
|
if (err)
|
||||||
@ -498,14 +508,6 @@ function iface_reload_config(phydev, config, old_config)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function iface_update_supplicant_macaddr(phy, config)
|
|
||||||
{
|
|
||||||
let macaddr_list = [];
|
|
||||||
for (let i = 0; i < length(config.bss); i++)
|
|
||||||
push(macaddr_list, config.bss[i].bssid);
|
|
||||||
ubus.call("wpa_supplicant", "phy_set_macaddr_list", { phy: phy, macaddr: macaddr_list });
|
|
||||||
}
|
|
||||||
|
|
||||||
function iface_set_config(phy, config)
|
function iface_set_config(phy, config)
|
||||||
{
|
{
|
||||||
let old_config = hostapd.data.config[phy];
|
let old_config = hostapd.data.config[phy];
|
||||||
@ -536,7 +538,6 @@ function iface_set_config(phy, config)
|
|||||||
|
|
||||||
hostapd.printf(`Restart interface for phy ${phy}`);
|
hostapd.printf(`Restart interface for phy ${phy}`);
|
||||||
let ret = iface_restart(phydev, config, old_config);
|
let ret = iface_restart(phydev, config, old_config);
|
||||||
iface_update_supplicant_macaddr(phy, config);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user