aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-01-24 18:54:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-01-24 18:54:20 +0000
commit0e6529d50cd7fb356c4d9d26f076d787f3f74c7c (patch)
tree91ea8a45c58b704a95e5f4c1f498d9b64bfac24f /package/hostapd
parent9b34dfb5715cceeddb974751bf60c4766cbf700b (diff)
downloadupstream-0e6529d50cd7fb356c4d9d26f076d787f3f74c7c.tar.gz
upstream-0e6529d50cd7fb356c4d9d26f076d787f3f74c7c.tar.bz2
upstream-0e6529d50cd7fb356c4d9d26f076d787f3f74c7c.zip
hostapd: update to 20110117
SVN-Revision: 25094
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/Makefile4
-rw-r--r--package/hostapd/patches/300-scan_ssid.patch6
-rw-r--r--package/hostapd/patches/310-madwifi_merge.patch70
-rw-r--r--package/hostapd/patches/320-nl80211_multicall_fixes.patch52
-rw-r--r--package/hostapd/patches/330-multicall_bridge_fix.patch8
-rw-r--r--package/hostapd/patches/340-madwifi_key_fixes.patch2
-rw-r--r--package/hostapd/patches/500-scan_wait.patch6
-rw-r--r--package/hostapd/patches/510-multicall.patch50
-rw-r--r--package/hostapd/patches/530-rescan_immediately.patch2
-rw-r--r--package/hostapd/patches/540-optional_rfkill.patch60
-rw-r--r--package/hostapd/patches/551-nl80211_del_beacon_bss.patch16
-rw-r--r--package/hostapd/patches/552-ctrl_iface_reload.patch8
-rw-r--r--package/hostapd/patches/553-ap_sta_support.patch8
-rw-r--r--package/hostapd/patches/600-terminate_on_setup_failure.patch14
-rw-r--r--package/hostapd/patches/700-use_dev_urandom.patch47
-rw-r--r--package/hostapd/patches/710-bring_down_interface.patch21
16 files changed, 222 insertions, 152 deletions
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile
index 443ee4fd61..b02ff27e72 100644
--- a/package/hostapd/Makefile
+++ b/package/hostapd/Makefile
@@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
-PKG_VERSION:=20101111
+PKG_VERSION:=20110117
PKG_RELEASE:=1
-PKG_REV:=5db8cf314ef169cd256483e32dcc49e31e605121
+PKG_REV:=cbcf92b42f237190b006ca8c3078593a58cbeac6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
diff --git a/package/hostapd/patches/300-scan_ssid.patch b/package/hostapd/patches/300-scan_ssid.patch
index 296690fb0d..47528f8b6b 100644
--- a/package/hostapd/patches/300-scan_ssid.patch
+++ b/package/hostapd/patches/300-scan_ssid.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
-@@ -250,6 +250,7 @@ static void wpa_supplicant_scan(void *el
+@@ -251,6 +251,7 @@ static void wpa_supplicant_scan(void *el
enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
#endif /* CONFIG_WPS */
struct wpa_driver_scan_params params;
@@ -8,7 +8,7 @@
size_t max_ssids;
enum wpa_states prev_state;
-@@ -306,6 +307,16 @@ static void wpa_supplicant_scan(void *el
+@@ -307,6 +308,16 @@ static void wpa_supplicant_scan(void *el
wpa_s->wpa_state == WPA_INACTIVE)
wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
@@ -25,7 +25,7 @@
/* Find the starting point from which to continue scanning */
ssid = wpa_s->conf->ssid;
if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
-@@ -369,6 +380,9 @@ static void wpa_supplicant_scan(void *el
+@@ -370,6 +381,9 @@ static void wpa_supplicant_scan(void *el
int_array_sort_unique(params.freqs);
}
diff --git a/package/hostapd/patches/310-madwifi_merge.patch b/package/hostapd/patches/310-madwifi_merge.patch
index b62fb3f201..adeb61baff 100644
--- a/package/hostapd/patches/310-madwifi_merge.patch
+++ b/package/hostapd/patches/310-madwifi_merge.patch
@@ -104,12 +104,7 @@
{
struct madwifi_driver_data *drv = priv;
struct ieee80211req_key wk;
-@@ -462,10 +459,14 @@ wpa_driver_madwifi_set_key(const char *i
- memset(&wk, 0, sizeof(wk));
- wk.ik_type = cipher;
- wk.ik_flags = IEEE80211_KEY_RECV | IEEE80211_KEY_XMIT;
-+
- if (addr == NULL) {
+@@ -466,6 +463,9 @@ wpa_driver_madwifi_set_key(const char *i
memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
wk.ik_keyix = key_idx;
wk.ik_flags |= IEEE80211_KEY_DEFAULT;
@@ -119,7 +114,7 @@
} else {
memcpy(wk.ik_macaddr, addr, IEEE80211_ADDR_LEN);
wk.ik_keyix = IEEE80211_KEYIX_NONE;
-@@ -485,6 +486,7 @@ wpa_driver_madwifi_set_key(const char *i
+@@ -485,6 +485,7 @@ wpa_driver_madwifi_set_key(const char *i
}
@@ -127,7 +122,7 @@
static int
madwifi_get_seqnum(const char *ifname, void *priv, const u8 *addr, int idx,
u8 *seq)
-@@ -591,7 +593,7 @@ madwifi_read_sta_driver_data(void *priv,
+@@ -591,7 +592,7 @@ madwifi_read_sta_driver_data(void *priv,
memset(data, 0, sizeof(*data));
snprintf(buf, sizeof(buf), "/proc/net/madwifi/%s/" MACSTR,
@@ -136,7 +131,7 @@
f = fopen(buf, "r");
if (!f) {
-@@ -757,7 +759,7 @@ static int madwifi_receive_probe_req(str
+@@ -757,7 +758,7 @@ static int madwifi_receive_probe_req(str
if (ret)
return ret;
@@ -145,7 +140,7 @@
madwifi_raw_receive, drv, 1);
if (drv->sock_raw == NULL)
return -1;
-@@ -1017,7 +1019,7 @@ madwifi_get_we_version(struct madwifi_dr
+@@ -1017,7 +1018,7 @@ madwifi_get_we_version(struct madwifi_dr
return -1;
memset(&iwr, 0, sizeof(iwr));
@@ -154,7 +149,7 @@
iwr.u.data.pointer = (caddr_t) range;
iwr.u.data.length = buflen;
-@@ -1134,17 +1136,17 @@ madwifi_init(struct hostapd_data *hapd,
+@@ -1134,17 +1135,17 @@ madwifi_init(struct hostapd_data *hapd,
perror("socket[PF_INET,SOCK_DGRAM]");
goto bad;
}
@@ -175,7 +170,7 @@
handle_read, drv, 1);
if (drv->sock_xmit == NULL)
goto bad;
-@@ -1158,7 +1160,7 @@ madwifi_init(struct hostapd_data *hapd,
+@@ -1158,7 +1159,7 @@ madwifi_init(struct hostapd_data *hapd,
1);
if (drv->sock_recv == NULL)
goto bad;
@@ -184,7 +179,7 @@
wpa_printf(MSG_DEBUG, "Interface in bridge %s; configure for "
"EAPOL receive", brname);
drv->sock_recv = l2_packet_init(brname, NULL, ETH_P_EAPOL,
-@@ -1169,7 +1171,7 @@ madwifi_init(struct hostapd_data *hapd,
+@@ -1169,7 +1170,7 @@ madwifi_init(struct hostapd_data *hapd,
drv->sock_recv = drv->sock_xmit;
memset(&iwr, 0, sizeof(iwr));
@@ -193,7 +188,7 @@
iwr.u.mode = IW_MODE_MASTER;
-@@ -1180,7 +1182,7 @@ madwifi_init(struct hostapd_data *hapd,
+@@ -1180,7 +1181,7 @@ madwifi_init(struct hostapd_data *hapd,
}
/* mark down during setup */
@@ -202,7 +197,7 @@
madwifi_set_privacy(drv, 0); /* default to no privacy */
madwifi_receive_probe_req(drv);
-@@ -1206,7 +1208,7 @@ madwifi_deinit(void *priv)
+@@ -1206,7 +1207,7 @@ madwifi_deinit(void *priv)
struct madwifi_driver_data *drv = priv;
netlink_deinit(drv->netlink);
@@ -211,7 +206,7 @@
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
-@@ -1225,7 +1227,7 @@ madwifi_set_ssid(void *priv, const u8 *b
+@@ -1225,7 +1226,7 @@ madwifi_set_ssid(void *priv, const u8 *b
struct iwreq iwr;
memset(&iwr, 0, sizeof(iwr));
@@ -220,7 +215,7 @@
iwr.u.essid.flags = 1; /* SSID active */
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len + 1;
-@@ -1246,7 +1248,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
+@@ -1246,7 +1247,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
int ret = 0;
memset(&iwr, 0, sizeof(iwr));
@@ -229,7 +224,7 @@
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len;
-@@ -1271,140 +1273,19 @@ static int
+@@ -1271,140 +1272,19 @@ static int
madwifi_commit(void *priv)
{
struct madwifi_driver_data *drv = priv;
@@ -374,7 +369,7 @@
const u8 *wpa_ie, size_t wpa_ie_len)
{
struct iwreq iwr;
-@@ -1415,7 +1296,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
+@@ -1415,7 +1295,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
iwr.u.data.pointer = (void *) wpa_ie;
iwr.u.data.length = wpa_ie_len;
@@ -383,7 +378,7 @@
perror("ioctl[IEEE80211_IOCTL_SETOPTIE]");
return -1;
}
-@@ -1423,156 +1304,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
+@@ -1423,157 +1303,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
}
static int
@@ -475,7 +470,7 @@
- wk.ik_keyix = key_idx;
- wk.ik_keylen = key_len;
-#ifdef WORDS_BIGENDIAN
-- {
+- if (seq) {
- size_t i;
- u8 tmp[WPA_KEY_RSC_LEN];
- os_memset(tmp, 0, sizeof(tmp));
@@ -484,7 +479,8 @@
- os_memcpy(&wk.ik_keyrsc, tmp, WPA_KEY_RSC_LEN);
- }
-#else /* WORDS_BIGENDIAN */
-- os_memcpy(&wk.ik_keyrsc, seq, seq_len);
+- if (seq)
+- os_memcpy(&wk.ik_keyrsc, seq, seq_len);
-#endif /* WORDS_BIGENDIAN */
- os_memcpy(wk.ik_keydata, key, key_len);
-
@@ -548,7 +544,7 @@
ret = -1;
if (wpa_driver_madwifi_set_auth_alg(drv, params->auth_alg) < 0)
ret = -1;
-@@ -1595,12 +1371,12 @@ wpa_driver_madwifi_associate(void *priv,
+@@ -1596,12 +1370,12 @@ wpa_driver_madwifi_associate(void *priv,
params->wpa_ie_len == 0)
privacy = 0;
@@ -563,7 +559,7 @@
ret = -1;
if (params->bssid == NULL) {
-@@ -1608,14 +1384,14 @@ wpa_driver_madwifi_associate(void *priv,
+@@ -1609,14 +1383,14 @@ wpa_driver_madwifi_associate(void *priv,
* roaming */
/* FIX: this does not seem to work; would probably need to
* change something in the driver */
@@ -580,7 +576,7 @@
ret = -1;
if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
params->ssid_len) < 0)
-@@ -1624,7 +1400,7 @@ wpa_driver_madwifi_associate(void *priv,
+@@ -1625,7 +1399,7 @@ wpa_driver_madwifi_associate(void *priv,
mlme.im_op = IEEE80211_MLME_ASSOC;
os_memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
@@ -589,7 +585,7 @@
wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
__func__);
ret = -1;
-@@ -1637,7 +1413,7 @@ wpa_driver_madwifi_associate(void *priv,
+@@ -1638,7 +1412,7 @@ wpa_driver_madwifi_associate(void *priv,
static int
wpa_driver_madwifi_set_auth_alg(void *priv, int auth_alg)
{
@@ -598,7 +594,7 @@
int authmode;
if ((auth_alg & WPA_AUTH_ALG_OPEN) &&
-@@ -1648,13 +1424,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
+@@ -1649,13 +1423,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
else
authmode = IEEE80211_AUTH_OPEN;
@@ -614,7 +610,7 @@
struct iwreq iwr;
int ret = 0;
const u8 *ssid = params->ssids[0].ssid;
-@@ -1672,7 +1448,7 @@ wpa_driver_madwifi_scan(void *priv, stru
+@@ -1673,7 +1447,7 @@ wpa_driver_madwifi_scan(void *priv, stru
if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
ret = -1;
@@ -623,7 +619,7 @@
perror("ioctl[SIOCSIWSCAN]");
ret = -1;
}
-@@ -1694,14 +1470,14 @@ wpa_driver_madwifi_scan(void *priv, stru
+@@ -1695,14 +1469,14 @@ wpa_driver_madwifi_scan(void *priv, stru
static int wpa_driver_madwifi_get_bssid(void *priv, u8 *bssid)
{
@@ -640,7 +636,7 @@
return wpa_driver_wext_get_ssid(drv->wext, ssid);
}
-@@ -1709,14 +1485,16 @@ static int wpa_driver_madwifi_get_ssid(v
+@@ -1710,14 +1484,16 @@ static int wpa_driver_madwifi_get_ssid(v
static struct wpa_scan_results *
wpa_driver_madwifi_get_scan_results(void *priv)
{
@@ -659,7 +655,7 @@
return wpa_driver_wext_set_operstate(drv->wext, state);
}
-@@ -1737,7 +1515,7 @@ static int wpa_driver_madwifi_set_probe_
+@@ -1738,7 +1514,7 @@ static int wpa_driver_madwifi_set_probe_
ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
sizeof(struct ieee80211req_getset_appiebuf) +
@@ -668,7 +664,7 @@
os_free(probe_req_ie);
-@@ -1747,7 +1525,7 @@ static int wpa_driver_madwifi_set_probe_
+@@ -1748,7 +1524,7 @@ static int wpa_driver_madwifi_set_probe_
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
{
@@ -677,7 +673,7 @@
drv = os_zalloc(sizeof(*drv));
if (drv == NULL)
-@@ -1758,17 +1536,17 @@ static void * wpa_driver_madwifi_init(vo
+@@ -1759,17 +1535,17 @@ static void * wpa_driver_madwifi_init(vo
drv->ctx = ctx;
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
@@ -699,7 +695,7 @@
wpa_printf(MSG_DEBUG, "%s: failed to enable WPA support",
__FUNCTION__);
goto fail3;
-@@ -1777,7 +1555,7 @@ static void * wpa_driver_madwifi_init(vo
+@@ -1778,7 +1554,7 @@ static void * wpa_driver_madwifi_init(vo
return drv;
fail3:
@@ -708,7 +704,7 @@
fail2:
wpa_driver_wext_deinit(drv->wext);
fail:
-@@ -1788,38 +1566,37 @@ fail:
+@@ -1789,38 +1565,37 @@ fail:
static void wpa_driver_madwifi_deinit(void *priv)
{
@@ -754,7 +750,7 @@
#ifdef HOSTAPD
.hapd_init = madwifi_init,
.hapd_deinit = madwifi_deinit,
-@@ -1839,7 +1616,8 @@ const struct wpa_driver_ops wpa_driver_m
+@@ -1840,7 +1615,8 @@ const struct wpa_driver_ops wpa_driver_m
.sta_clear_stats = madwifi_sta_clear_stats,
.commit = madwifi_commit,
.set_ap_wps_ie = madwifi_set_ap_wps_ie,
@@ -764,7 +760,7 @@
.get_bssid = wpa_driver_madwifi_get_bssid,
.get_ssid = wpa_driver_madwifi_get_ssid,
.init = wpa_driver_madwifi_init,
-@@ -1851,5 +1629,5 @@ const struct wpa_driver_ops wpa_driver_m
+@@ -1852,5 +1628,5 @@ const struct wpa_driver_ops wpa_driver_m
.disassociate = wpa_driver_madwifi_disassociate,
.associate = wpa_driver_madwifi_associate,
.set_operstate = wpa_driver_madwifi_set_operstate,
diff --git a/package/hostapd/patches/320-nl80211_multicall_fixes.patch b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
index e6307e5e8c..5644d6b8db 100644
--- a/package/hostapd/patches/320-nl80211_multicall_fixes.patch
+++ b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -1380,7 +1380,6 @@ nla_put_failure:
+@@ -1468,7 +1468,6 @@ nla_put_failure:
}
@@ -8,7 +8,7 @@
struct wiphy_info_data {
int max_scan_ssids;
int ap_supported;
-@@ -1493,7 +1492,6 @@ static int wpa_driver_nl80211_capa(struc
+@@ -1592,7 +1591,6 @@ static int wpa_driver_nl80211_capa(struc
return 0;
}
@@ -16,7 +16,7 @@
static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
-@@ -1667,6 +1665,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1804,6 +1802,7 @@ static void * wpa_driver_nl80211_init(vo
drv->monitor_ifidx = -1;
drv->monitor_sock = -1;
drv->ioctl_sock = -1;
@@ -24,7 +24,7 @@
if (wpa_driver_nl80211_init_nl(drv)) {
os_free(drv);
-@@ -1823,32 +1822,32 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -1967,32 +1966,32 @@ wpa_driver_nl80211_finish_drv_init(struc
drv->ifindex = if_nametoindex(bss->ifname);
drv->first_bss.ifindex = drv->ifindex;
@@ -33,12 +33,7 @@
- wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
- "use managed mode");
- }
-+ if (drv->nlmode == NL80211_IFTYPE_STATION) {
-+ if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
-+ wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
-+ "use managed mode");
-+ }
-
+-
- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
- if (rfkill_is_blocked(drv->rfkill)) {
- wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
@@ -50,6 +45,12 @@
- wpa_printf(MSG_ERROR, "nl80211: Could not set "
- "interface '%s' UP", bss->ifname);
- return -1;
++ if (drv->nlmode == NL80211_IFTYPE_STATION) {
++ if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
++ wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
++ "use managed mode");
++ }
++
+ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
+ if (rfkill_is_blocked(drv->rfkill)) {
+ wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
@@ -77,24 +78,9 @@
+ 1, IF_OPER_DORMANT);
+ }
- if (nl80211_register_action_frames(drv) < 0) {
- wpa_printf(MSG_DEBUG, "nl80211: Failed to register Action "
-@@ -2511,13 +2510,9 @@ static int wpa_driver_nl80211_set_key(co
- */
- if (ret || !set_tx || alg == WPA_ALG_NONE)
- return ret;
--#ifdef HOSTAPD
-- if (addr)
-- return ret;
--#else /* HOSTAPD */
-+
- if (drv->nlmode == NL80211_IFTYPE_AP && addr)
- return ret;
--#endif /* HOSTAPD */
-
- msg = nlmsg_alloc();
- if (!msg)
-@@ -3368,7 +3363,8 @@ static void nl80211_remove_iface(struct
+ if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
+ return -1;
+@@ -3719,7 +3718,8 @@ static void nl80211_remove_iface(struct
#ifdef HOSTAPD
/* stop listening for EAPOL on this interface */
@@ -104,7 +90,7 @@
#endif /* HOSTAPD */
msg = nlmsg_alloc();
-@@ -3441,7 +3437,8 @@ static int nl80211_create_iface_once(str
+@@ -3792,7 +3792,8 @@ static int nl80211_create_iface_once(str
#ifdef HOSTAPD
/* start listening for EAPOL on this interface */
@@ -114,11 +100,3 @@
#endif /* HOSTAPD */
if (addr && iftype != NL80211_IFTYPE_MONITOR &&
-@@ -5155,6 +5152,7 @@ static void *i802_init(struct hostapd_da
- return NULL;
-
- drv = bss->drv;
-+ drv->nlmode = NL80211_IFTYPE_AP;
- if (linux_br_get(brname, params->ifname) == 0) {
- wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in bridge %s",
- params->ifname, brname);
diff --git a/package/hostapd/patches/330-multicall_bridge_fix.patch b/package/hostapd/patches/330-multicall_bridge_fix.patch
index 36f275779f..5e930f7288 100644
--- a/package/hostapd/patches/330-multicall_bridge_fix.patch
+++ b/package/hostapd/patches/330-multicall_bridge_fix.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -452,6 +452,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -464,6 +464,10 @@ static void wpa_driver_nl80211_event_rtm
return;
}
@@ -11,7 +11,7 @@
wpa_printf(MSG_DEBUG, "RTM_NEWLINK: operstate=%d ifi_flags=0x%x "
"(%s%s%s%s)",
drv->operstate, ifi->ifi_flags,
-@@ -523,6 +527,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -535,6 +539,10 @@ static void wpa_driver_nl80211_event_rtm
attrlen = len;
attr = (struct rtattr *) buf;
@@ -22,7 +22,7 @@
rta_len = RTA_ALIGN(sizeof(struct rtattr));
while (RTA_OK(attr, attrlen)) {
if (attr->rta_type == IFLA_IFNAME) {
-@@ -1490,6 +1498,11 @@ static int wpa_driver_nl80211_capa(struc
+@@ -1589,6 +1597,11 @@ static int wpa_driver_nl80211_capa(struc
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
drv->capa.max_remain_on_chan = 5000;
@@ -34,7 +34,7 @@
return 0;
}
-@@ -5162,8 +5175,6 @@ static void *i802_init(struct hostapd_da
+@@ -5561,8 +5574,6 @@ static void *i802_init(struct hostapd_da
br_ifindex = 0;
}
diff --git a/package/hostapd/patches/340-madwifi_key_fixes.patch b/package/hostapd/patches/340-madwifi_key_fixes.patch
index 7eca91fc18..5d2e9c1078 100644
--- a/package/hostapd/patches/340-madwifi_key_fixes.patch
+++ b/package/hostapd/patches/340-madwifi_key_fixes.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_madwifi.c
+++ b/src/drivers/driver_madwifi.c
-@@ -464,15 +464,30 @@ madwifi_set_key(const char *ifname, void
+@@ -463,15 +463,30 @@ madwifi_set_key(const char *ifname, void
memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
wk.ik_keyix = key_idx;
wk.ik_flags |= IEEE80211_KEY_DEFAULT;
diff --git a/package/hostapd/patches/500-scan_wait.patch b/package/hostapd/patches/500-scan_wait.patch
index 61a142a2f1..506502a4b3 100644
--- a/package/hostapd/patches/500-scan_wait.patch
+++ b/package/hostapd/patches/500-scan_wait.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -271,6 +271,7 @@ struct hostapd_iface {
+@@ -221,6 +221,7 @@ struct hostapd_iface {
int (*for_each_interface)(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx);
@@ -10,7 +10,7 @@
/* hostapd.c */
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -787,6 +787,9 @@ int hostapd_setup_interface_complete(str
+@@ -779,6 +779,9 @@ int hostapd_setup_interface_complete(str
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
@@ -127,7 +127,7 @@
} else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -380,6 +380,7 @@ struct hostapd_config {
+@@ -382,6 +382,7 @@ struct hostapd_config {
int ht_op_mode_fixed;
u16 ht_capab;
diff --git a/package/hostapd/patches/510-multicall.patch b/package/hostapd/patches/510-multicall.patch
index 80a032e5ab..4e239c2969 100644
--- a/package/hostapd/patches/510-multicall.patch
+++ b/package/hostapd/patches/510-multicall.patch
@@ -8,7 +8,7 @@
ifndef CONFIG_OS
ifdef CONFIG_NATIVE_WINDOWS
-@@ -157,10 +158,14 @@ ifdef CONFIG_IEEE80211N
+@@ -159,10 +160,14 @@ ifdef CONFIG_IEEE80211N
CFLAGS += -DCONFIG_IEEE80211N
endif
@@ -26,7 +26,7 @@
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
-@@ -763,6 +768,12 @@ install: all
+@@ -775,6 +780,12 @@ install: all
BCHECK=../src/drivers/build.hostapd
@@ -39,7 +39,7 @@
hostapd: $(BCHECK) $(OBJS)
$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
-@@ -801,6 +812,12 @@ HOBJS += ../src/crypto/aes-internal.o
+@@ -813,6 +824,12 @@ HOBJS += ../src/crypto/aes-internal.o
HOBJS += ../src/crypto/aes-internal-enc.o
endif
@@ -54,15 +54,15 @@
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
-@@ -52,6 +52,7 @@ OBJS_p += ../src/utils/wpabuf.o
- OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
+@@ -53,6 +53,7 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr
+ OBJS_c += ../src/utils/wpa_debug.o
-include .config
+-include $(if $(MULTICALL),../hostapd/.config)
ifndef CONFIG_OS
ifdef CONFIG_NATIVE_WINDOWS
-@@ -622,6 +623,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -627,6 +628,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
LIBS += -ldl -rdynamic
endif
@@ -73,7 +73,19 @@
endif
ifdef CONFIG_AP
-@@ -676,6 +681,12 @@ CFLAGS += -DEAP_SERVER_WSC
+@@ -635,9 +640,11 @@ NEED_EAP_COMMON=y
+ NEED_RSN_AUTHENTICATOR=y
+ CFLAGS += -DCONFIG_AP
+ OBJS += ap.o
++ifndef MULTICALL
+ CFLAGS += -DCONFIG_NO_RADIUS
+ CFLAGS += -DCONFIG_NO_ACCOUNTING
+ CFLAGS += -DCONFIG_NO_VLAN
++endif
+ OBJS += ../src/ap/hostapd.o
+ OBJS += ../src/ap/wpa_auth_glue.o
+ OBJS += ../src/ap/utils.o
+@@ -681,10 +688,18 @@ CFLAGS += -DEAP_SERVER_WSC
OBJS += ../src/ap/wps_hostapd.o
OBJS += ../src/eap_server/eap_server_wsc.o
endif
@@ -86,7 +98,13 @@
endif
ifdef NEED_RSN_AUTHENTICATOR
-@@ -1317,6 +1328,12 @@ BCHECK=../src/drivers/build.wpa_supplica
++ifndef MULTICALL
+ CFLAGS += -DCONFIG_NO_RADIUS
++endif
+ NEED_AES_WRAP=y
+ OBJS += ../src/ap/wpa_auth.o
+ OBJS += ../src/ap/wpa_auth_ie.o
+@@ -1334,6 +1349,12 @@ BCHECK=../src/drivers/build.wpa_supplica
wpa_priv: $(BCHECK) $(OBJS_priv)
$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
@@ -99,7 +117,7 @@
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
-@@ -1376,6 +1393,12 @@ endif
+@@ -1393,6 +1414,12 @@ endif
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
@$(E) " CC " $<
@@ -114,7 +132,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -2684,8 +2684,8 @@ union wpa_event_data {
+@@ -3103,8 +3103,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -127,7 +145,7 @@
/*
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
-@@ -420,8 +420,8 @@ static void hostapd_event_eapol_rx(struc
+@@ -443,8 +443,8 @@ static void hostapd_event_eapol_rx(struc
}
@@ -138,7 +156,7 @@
{
struct hostapd_data *hapd = ctx;
-@@ -498,5 +498,6 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -526,5 +526,6 @@ void wpa_supplicant_event(void *ctx, enu
break;
}
}
@@ -169,8 +187,8 @@
for (;;) {
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -1556,8 +1556,8 @@ static void ft_rx_action(struct wpa_supp
- #endif /* CONFIG_IEEE80211R */
+@@ -1679,8 +1679,8 @@ static void wpa_supplicant_event_unprot_
+ }
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
@@ -182,7 +200,7 @@
u16 reason_code = 0;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2320,6 +2320,9 @@ struct wpa_supplicant * wpa_supplicant_g
+@@ -2332,6 +2332,9 @@ struct wpa_supplicant * wpa_supplicant_g
return NULL;
}
@@ -192,7 +210,7 @@
/**
* wpa_supplicant_init - Initialize %wpa_supplicant
-@@ -2338,6 +2341,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -2350,6 +2353,7 @@ struct wpa_global * wpa_supplicant_init(
if (params == NULL)
return NULL;
diff --git a/package/hostapd/patches/530-rescan_immediately.patch b/package/hostapd/patches/530-rescan_immediately.patch
index 20906ce9b2..6629d6b59c 100644
--- a/package/hostapd/patches/530-rescan_immediately.patch
+++ b/package/hostapd/patches/530-rescan_immediately.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -893,7 +893,7 @@ static void wpa_supplicant_event_scan_re
+@@ -936,7 +936,7 @@ static void _wpa_supplicant_event_scan_r
wpa_printf(MSG_DEBUG, "Setup a new network");
wpa_supplicant_associate(wpa_s, NULL, ssid);
} else {
diff --git a/package/hostapd/patches/540-optional_rfkill.patch b/package/hostapd/patches/540-optional_rfkill.patch
index 3ec7e239a6..796a7c58f0 100644
--- a/package/hostapd/patches/540-optional_rfkill.patch
+++ b/package/hostapd/patches/540-optional_rfkill.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -115,7 +115,9 @@ struct wpa_driver_nl80211_data {
+@@ -127,7 +127,9 @@ struct wpa_driver_nl80211_data {
int ifindex;
int if_removed;
int if_disabled;
@@ -10,7 +10,7 @@
struct wpa_driver_capa capa;
int has_capability;
-@@ -1630,7 +1632,7 @@ err1:
+@@ -1729,7 +1731,7 @@ err1:
return -1;
}
@@ -19,15 +19,15 @@
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
-@@ -1652,6 +1654,7 @@ static void wpa_driver_nl80211_rfkill_un
+@@ -1751,6 +1753,7 @@ static void wpa_driver_nl80211_rfkill_un
}
/* rtnetlink ifup handler will report interface as enabled */
}
+#endif /* CONFIG_RFKILL */
- /**
-@@ -1665,7 +1668,9 @@ static void * wpa_driver_nl80211_init(vo
+ static void nl80211_get_phy_name(struct wpa_driver_nl80211_data *drv)
+@@ -1799,7 +1802,9 @@ static void * wpa_driver_nl80211_init(vo
{
struct wpa_driver_nl80211_data *drv;
struct netlink_config *cfg;
@@ -37,7 +37,7 @@
struct i802_bss *bss;
drv = os_zalloc(sizeof(*drv));
-@@ -1703,6 +1708,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1842,6 +1847,7 @@ static void * wpa_driver_nl80211_init(vo
goto failed;
}
@@ -45,7 +45,7 @@
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto failed;
-@@ -1715,6 +1721,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1854,6 +1860,7 @@ static void * wpa_driver_nl80211_init(vo
wpa_printf(MSG_DEBUG, "nl80211: RFKILL status not available");
os_free(rcfg);
}
@@ -53,7 +53,7 @@
if (wpa_driver_nl80211_finish_drv_init(drv))
goto failed;
-@@ -1722,7 +1729,9 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1861,7 +1868,9 @@ static void * wpa_driver_nl80211_init(vo
return bss;
failed:
@@ -63,7 +63,7 @@
netlink_deinit(drv->netlink);
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
-@@ -1820,10 +1829,12 @@ static int nl80211_register_action_frame
+@@ -1964,10 +1973,12 @@ static int nl80211_register_action_frame
}
@@ -76,7 +76,7 @@
static int
-@@ -1842,13 +1853,16 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -1986,13 +1997,16 @@ wpa_driver_nl80211_finish_drv_init(struc
}
if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
@@ -94,7 +94,7 @@
wpa_printf(MSG_ERROR, "nl80211: Could not set "
"interface '%s' UP", bss->ifname);
return -1;
-@@ -1873,8 +1887,10 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2020,8 +2034,10 @@ wpa_driver_nl80211_finish_drv_init(struc
}
if (send_rfkill_event) {
@@ -105,7 +105,7 @@
}
return 0;
-@@ -1955,7 +1971,9 @@ static void wpa_driver_nl80211_deinit(vo
+@@ -2102,7 +2118,9 @@ static void wpa_driver_nl80211_deinit(vo
netlink_send_oper_ifla(drv->netlink, drv->ifindex, 0, IF_OPER_UP);
netlink_deinit(drv->netlink);
@@ -115,9 +115,19 @@
eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
+@@ -5631,7 +5649,9 @@ static void *i802_init(struct hostapd_da
+
+ failed:
+ nl80211_remove_monitor_interface(drv);
++#ifdef CONFIG_RFKILL
+ rfkill_deinit(drv->rfkill);
++#endif
+ netlink_deinit(drv->netlink);
+ if (drv->ioctl_sock >= 0)
+ close(drv->ioctl_sock);
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
-@@ -700,7 +700,7 @@ static void wpa_driver_wext_event_rtm_de
+@@ -702,7 +702,7 @@ static void wpa_driver_wext_event_rtm_de
}
}
@@ -126,16 +136,16 @@
static void wpa_driver_wext_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "WEXT: RFKILL blocked");
-@@ -722,7 +722,7 @@ static void wpa_driver_wext_rfkill_unblo
+@@ -724,7 +724,7 @@ static void wpa_driver_wext_rfkill_unblo
}
/* rtnetlink ifup handler will report interface as enabled */
}
-
+#endif /* CONFIG_RFKILL */
- /**
- * wpa_driver_wext_init - Initialize WE driver interface
-@@ -735,7 +735,9 @@ void * wpa_driver_wext_init(void *ctx, c
+ static void wext_get_phy_name(struct wpa_driver_wext_data *drv)
+ {
+@@ -770,7 +770,9 @@ void * wpa_driver_wext_init(void *ctx, c
{
struct wpa_driver_wext_data *drv;
struct netlink_config *cfg;
@@ -145,7 +155,7 @@
char path[128];
struct stat buf;
-@@ -769,6 +771,7 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -805,6 +807,7 @@ void * wpa_driver_wext_init(void *ctx, c
goto err2;
}
@@ -153,7 +163,7 @@
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto err3;
-@@ -781,6 +784,7 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -817,6 +820,7 @@ void * wpa_driver_wext_init(void *ctx, c
wpa_printf(MSG_DEBUG, "WEXT: RFKILL status not available");
os_free(rcfg);
}
@@ -161,7 +171,7 @@
drv->mlme_sock = -1;
-@@ -792,7 +796,9 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -828,7 +832,9 @@ void * wpa_driver_wext_init(void *ctx, c
return drv;
err3:
@@ -171,7 +181,7 @@
netlink_deinit(drv->netlink);
err2:
close(drv->ioctl_sock);
-@@ -802,10 +808,12 @@ err1:
+@@ -838,10 +844,12 @@ err1:
}
@@ -184,7 +194,7 @@
static int wpa_driver_wext_finish_drv_init(struct wpa_driver_wext_data *drv)
-@@ -813,13 +821,16 @@ static int wpa_driver_wext_finish_drv_in
+@@ -849,13 +857,16 @@ static int wpa_driver_wext_finish_drv_in
int send_rfkill_event = 0;
if (linux_set_iface_flags(drv->ioctl_sock, drv->ifname, 1) < 0) {
@@ -202,7 +212,7 @@
wpa_printf(MSG_ERROR, "WEXT: Could not set "
"interface '%s' UP", drv->ifname);
return -1;
-@@ -867,8 +878,10 @@ static int wpa_driver_wext_finish_drv_in
+@@ -903,8 +914,10 @@ static int wpa_driver_wext_finish_drv_in
1, IF_OPER_DORMANT);
if (send_rfkill_event) {
@@ -213,7 +223,7 @@
}
return 0;
-@@ -898,7 +911,9 @@ void wpa_driver_wext_deinit(void *priv)
+@@ -934,7 +947,9 @@ void wpa_driver_wext_deinit(void *priv)
netlink_send_oper_ifla(drv->netlink, drv->ifindex, 0, IF_OPER_UP);
netlink_deinit(drv->netlink);
@@ -259,7 +269,7 @@
--- a/src/drivers/driver_wext.h
+++ b/src/drivers/driver_wext.h
-@@ -27,7 +27,9 @@ struct wpa_driver_wext_data {
+@@ -28,7 +28,9 @@ struct wpa_driver_wext_data {
int ifindex2;
int if_removed;
int if_disabled;
diff --git a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
index e24e92f405..6e20cecc08 100644
--- a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
+++ b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -1897,23 +1897,41 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2044,23 +2044,41 @@ wpa_driver_nl80211_finish_drv_init(struc
}
@@ -44,18 +44,18 @@
/**
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -5882,4 +5900,5 @@ const struct wpa_driver_ops wpa_driver_n
- .signal_monitor = nl80211_signal_monitor,
- .send_frame = nl80211_send_frame,
+@@ -6456,4 +6474,5 @@ const struct wpa_driver_ops wpa_driver_n
.set_intra_bss = nl80211_set_intra_bss,
+ .set_param = nl80211_set_param,
+ .get_radio_name = nl80211_get_radio_name,
+ .stop_ap = wpa_driver_nl80211_stop_ap,
};
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -1909,6 +1909,8 @@ struct wpa_driver_ops {
- * set_intra_bss - Enables/Disables intra BSS bridging
- */
- int (*set_intra_bss)(void *priv, int enabled);
+@@ -2187,6 +2187,8 @@ struct wpa_driver_ops {
+ int (*p2p_invite)(void *priv, const u8 *peer, int role,
+ const u8 *bssid, const u8 *ssid, size_t ssid_len,
+ const u8 *go_dev_addr, int persistent_group);
+
+ int (*stop_ap)(void *priv);
};
diff --git a/package/hostapd/patches/552-ctrl_iface_reload.patch b/package/hostapd/patches/552-ctrl_iface_reload.patch
index 0cb1ccc699..9dcf49d627 100644
--- a/package/hostapd/patches/552-ctrl_iface_reload.patch
+++ b/package/hostapd/patches/552-ctrl_iface_reload.patch
@@ -1,6 +1,6 @@
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -38,6 +38,7 @@
+@@ -39,6 +39,7 @@
#include "wps/wps_defs.h"
#include "wps/wps.h"
#include "ctrl_iface.h"
@@ -8,7 +8,7 @@
struct wpa_ctrl_dst {
-@@ -48,6 +49,7 @@ struct wpa_ctrl_dst {
+@@ -49,6 +50,7 @@ struct wpa_ctrl_dst {
int errors;
};
@@ -16,7 +16,7 @@
static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level,
const char *buf, size_t len);
-@@ -322,6 +324,66 @@ static int hostapd_ctrl_iface_disassocia
+@@ -323,6 +325,66 @@ static int hostapd_ctrl_iface_disassocia
return 0;
}
@@ -83,7 +83,7 @@
#ifdef CONFIG_IEEE80211W
#ifdef NEED_AP_MLME
-@@ -818,6 +880,10 @@ static void hostapd_ctrl_iface_receive(i
+@@ -819,6 +881,10 @@ static void hostapd_ctrl_iface_receive(i
reply_len += res;
}
#endif /* CONFIG_NO_RADIUS */
diff --git a/package/hostapd/patches/553-ap_sta_support.patch b/package/hostapd/patches/553-ap_sta_support.patch
index 82ca043fc1..c563618f8d 100644
--- a/package/hostapd/patches/553-ap_sta_support.patch
+++ b/package/hostapd/patches/553-ap_sta_support.patch
@@ -20,9 +20,9 @@
int countermeasures;
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
-@@ -51,6 +51,11 @@ OBJS_p += ../src/utils/wpa_debug.o
- OBJS_p += ../src/utils/wpabuf.o
+@@ -52,6 +52,11 @@ OBJS_p += ../src/utils/wpabuf.o
OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
+ OBJS_c += ../src/utils/wpa_debug.o
+ifdef MULTICALL
+OBJS += ../src/common/wpa_ctrl.o
@@ -90,7 +90,7 @@
/* Configure default/group WEP keys for static WEP */
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
{
-@@ -557,8 +606,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -559,8 +608,16 @@ void wpa_supplicant_set_state(struct wpa
#ifdef CONFIG_P2P
wpas_p2p_completed(wpa_s);
#endif /* CONFIG_P2P */
@@ -107,7 +107,7 @@
wpa_s->new_connection = 1;
wpa_drv_set_operstate(wpa_s, 0);
#ifndef IEEE8021X_EAPOL
-@@ -2033,6 +2090,21 @@ static int wpa_supplicant_init_iface(str
+@@ -2045,6 +2102,21 @@ static int wpa_supplicant_init_iface(str
os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname,
sizeof(wpa_s->bridge_ifname));
}
diff --git a/package/hostapd/patches/600-terminate_on_setup_failure.patch b/package/hostapd/patches/600-terminate_on_setup_failure.patch
index 9a7e889ebf..cc0f95e6d6 100644
--- a/package/hostapd/patches/600-terminate_on_setup_failure.patch
+++ b/package/hostapd/patches/600-terminate_on_setup_failure.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -717,11 +717,8 @@ int hostapd_setup_interface_complete(str
+@@ -709,11 +709,8 @@ int hostapd_setup_interface_complete(str
size_t j;
u8 *prev_addr;
@@ -14,7 +14,7 @@
wpa_printf(MSG_DEBUG, "Completing interface initialization");
if (hapd->iconf->channel) {
-@@ -737,7 +734,7 @@ int hostapd_setup_interface_complete(str
+@@ -729,7 +726,7 @@ int hostapd_setup_interface_complete(str
hapd->iconf->secondary_channel)) {
wpa_printf(MSG_ERROR, "Could not set channel for "
"kernel driver");
@@ -23,7 +23,7 @@
}
}
-@@ -748,7 +745,7 @@ int hostapd_setup_interface_complete(str
+@@ -740,7 +737,7 @@ int hostapd_setup_interface_complete(str
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_WARNING,
"Failed to prepare rates table.");
@@ -32,7 +32,7 @@
}
}
-@@ -756,14 +753,14 @@ int hostapd_setup_interface_complete(str
+@@ -748,14 +745,14 @@ int hostapd_setup_interface_complete(str
hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {
wpa_printf(MSG_ERROR, "Could not set RTS threshold for "
"kernel driver");
@@ -49,7 +49,7 @@
}
prev_addr = hapd->own_addr;
-@@ -773,7 +770,7 @@ int hostapd_setup_interface_complete(str
+@@ -765,7 +762,7 @@ int hostapd_setup_interface_complete(str
if (j)
os_memcpy(hapd->own_addr, prev_addr, ETH_ALEN);
if (hostapd_setup_bss(hapd, j == 0))
@@ -58,7 +58,7 @@
if (hostapd_mac_comp_empty(hapd->conf->bssid) == 0)
prev_addr = hapd->own_addr;
}
-@@ -785,7 +782,7 @@ int hostapd_setup_interface_complete(str
+@@ -777,7 +774,7 @@ int hostapd_setup_interface_complete(str
if (hostapd_driver_commit(hapd) < 0) {
wpa_printf(MSG_ERROR, "%s: Failed to commit driver "
"configuration", __func__);
@@ -67,7 +67,7 @@
}
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
-@@ -795,6 +792,11 @@ int hostapd_setup_interface_complete(str
+@@ -787,6 +784,11 @@ int hostapd_setup_interface_complete(str
iface->init_complete(iface);
return 0;
diff --git a/package/hostapd/patches/700-use_dev_urandom.patch b/package/hostapd/patches/700-use_dev_urandom.patch
new file mode 100644
index 0000000000..b72319ff17
--- /dev/null
+++ b/package/hostapd/patches/700-use_dev_urandom.patch
@@ -0,0 +1,47 @@
+--- a/src/crypto/random.c
++++ b/src/crypto/random.c
+@@ -202,16 +202,16 @@ int random_pool_ready(void)
+
+ /*
+ * Try to fetch some more data from the kernel high quality
+- * /dev/random. There may not be enough data available at this point,
++ * /dev/urandom. There may not be enough data available at this point,
+ * so use non-blocking read to avoid blocking the application
+ * completely.
+ */
+- fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
++ fd = open("/dev/urandom", O_RDONLY | O_NONBLOCK);
+ if (fd < 0) {
+ #ifndef CONFIG_NO_STDOUT_DEBUG
+ int error = errno;
+- perror("open(/dev/random)");
+- wpa_printf(MSG_ERROR, "random: Cannot open /dev/random: %s",
++ perror("open(/dev/urandom)");
++ wpa_printf(MSG_ERROR, "random: Cannot open /dev/urandom: %s",
+ strerror(error));
+ #endif /* CONFIG_NO_STDOUT_DEBUG */
+ return -1;
+@@ -220,12 +220,12 @@ int random_pool_ready(void)
+ res = read(fd, dummy_key + dummy_key_avail,
+ sizeof(dummy_key) - dummy_key_avail);
+ if (res < 0) {
+- wpa_printf(MSG_ERROR, "random: Cannot read from /dev/random: "
++ wpa_printf(MSG_ERROR, "random: Cannot read from /dev/urandom: "
+ "%s", strerror(errno));
+ res = 0;
+ }
+ wpa_printf(MSG_DEBUG, "random: Got %u/%u bytes from "
+- "/dev/random", (unsigned) res,
++ "/dev/urandom", (unsigned) res,
+ (unsigned) (sizeof(dummy_key) - dummy_key_avail));
+ dummy_key_avail += res;
+ close(fd);
+@@ -234,7 +234,7 @@ int random_pool_ready(void)
+ return 1;
+
+ wpa_printf(MSG_INFO, "random: Only %u/%u bytes of strong "
+- "random data available from /dev/random",
++ "random data available from /dev/urandom",
+ (unsigned) dummy_key_avail, (unsigned) sizeof(dummy_key));
+
+ if (own_pool_ready >= MIN_READY_MARK ||
diff --git a/package/hostapd/patches/710-bring_down_interface.patch b/package/hostapd/patches/710-bring_down_interface.patch
new file mode 100644
index 0000000000..29f29d38b0
--- /dev/null
+++ b/package/hostapd/patches/710-bring_down_interface.patch
@@ -0,0 +1,21 @@
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -4864,9 +4864,6 @@ static int wpa_driver_nl80211_set_mode(v
+ /* Try to set the mode again while the interface is
+ * down */
+ ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
+- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname,
+- 1))
+- ret = -1;
+ if (!ret)
+ break;
+ } else
+@@ -4879,6 +4876,8 @@ static int wpa_driver_nl80211_set_mode(v
+ wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while "
+ "interface is down");
+ drv->nlmode = nlmode;
++ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1))
++ ret = -1;
+ }
+
+ done: