summaryrefslogtreecommitdiff
path: root/package/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-02 19:44:47 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-04-02 19:44:47 +0000
commit8807b396cea23d9d4f2b08583f59b076e59efbb5 (patch)
tree3676a81622bd4730bf194beb47982670829b599b /package/hostapd
parentf4aef6d5534e65a7c1bce7a118168ff5e85f0f75 (diff)
downloadmtk-20170518-8807b396cea23d9d4f2b08583f59b076e59efbb5.zip
mtk-20170518-8807b396cea23d9d4f2b08583f59b076e59efbb5.tar.gz
mtk-20170518-8807b396cea23d9d4f2b08583f59b076e59efbb5.tar.bz2
hostapd: update to 20110402, fixes issues with non-QoS clients
SVN-Revision: 26414
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/Makefile6
-rw-r--r--package/hostapd/patches/320-nl80211_multicall_fixes.patch44
-rw-r--r--package/hostapd/patches/330-multicall_bridge_fix.patch10
-rw-r--r--package/hostapd/patches/350-hostap_multicall_fix.patch38
-rw-r--r--package/hostapd/patches/500-scan_wait.patch20
-rw-r--r--package/hostapd/patches/510-multicall.patch12
-rw-r--r--package/hostapd/patches/530-rescan_immediately.patch2
-rw-r--r--package/hostapd/patches/540-optional_rfkill.patch22
-rw-r--r--package/hostapd/patches/551-nl80211_del_beacon_bss.patch12
-rw-r--r--package/hostapd/patches/553-ap_sta_support.patch6
-rw-r--r--package/hostapd/patches/560-disable_ctrl_iface_mib.patch16
-rw-r--r--package/hostapd/patches/700-random_pool_add_kernel.patch18
-rw-r--r--package/hostapd/patches/710-bring_down_interface.patch4
-rw-r--r--package/hostapd/patches/730-nl80211_enable_qosdata.patch195
14 files changed, 95 insertions, 310 deletions
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile
index b232b31..492edd7 100644
--- a/package/hostapd/Makefile
+++ b/package/hostapd/Makefile
@@ -8,16 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
-PKG_VERSION:=20110221
+PKG_VERSION:=20110402
PKG_RELEASE:=1
-PKG_REV:=cd9fc7869aa1e3935c028d4032d15c75e9946410
+PKG_REV:=4378fc14ebfb355705e7674bf347ea659bcd77bc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=git
-PKG_MIRROR_MD5SUM:=f5f1462884d6e6808413e185b19ea3e3
+PKG_MIRROR_MD5SUM:=fd5e29bbfcb89a4e60fef633bd4efa94
PKG_BUILD_DEPENDS:= \
PACKAGE_kmod-madwifi:madwifi \
diff --git a/package/hostapd/patches/320-nl80211_multicall_fixes.patch b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
index 9bd7369..62ad1be 100644
--- a/package/hostapd/patches/320-nl80211_multicall_fixes.patch
+++ b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
@@ -1,22 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -1468,7 +1468,6 @@ nla_put_failure:
- }
-
-
--#ifndef HOSTAPD
- struct wiphy_info_data {
- int max_scan_ssids;
- int ap_supported;
-@@ -1613,7 +1612,6 @@ static int wpa_driver_nl80211_capa(struc
-
- return 0;
- }
--#endif /* HOSTAPD */
-
-
- static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
-@@ -1825,6 +1823,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1847,6 +1847,7 @@ static void * wpa_driver_nl80211_init(vo
drv->monitor_ifidx = -1;
drv->monitor_sock = -1;
drv->ioctl_sock = -1;
@@ -24,7 +8,7 @@
if (wpa_driver_nl80211_init_nl(drv)) {
os_free(drv);
-@@ -1988,32 +1987,32 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2013,29 +2014,29 @@ wpa_driver_nl80211_finish_drv_init(struc
drv->ifindex = if_nametoindex(bss->ifname);
drv->first_bss.ifindex = drv->ifindex;
@@ -33,7 +17,12 @@
- 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 "
@@ -45,12 +34,6 @@
- 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 "
@@ -66,11 +49,6 @@
}
- }
-- if (wpa_driver_nl80211_capa(drv))
-- return -1;
-+ if (wpa_driver_nl80211_capa(drv))
-+ return -1;
-
- netlink_send_oper_ifla(drv->netlink, drv->ifindex,
- 1, IF_OPER_DORMANT);
-#endif /* HOSTAPD */
@@ -78,9 +56,9 @@
+ 1, IF_OPER_DORMANT);
+ }
- if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
+ if (wpa_driver_nl80211_capa(drv))
return -1;
-@@ -3738,7 +3737,8 @@ static void nl80211_remove_iface(struct
+@@ -3765,7 +3766,8 @@ static void nl80211_remove_iface(struct
#ifdef HOSTAPD
/* stop listening for EAPOL on this interface */
@@ -90,7 +68,7 @@
#endif /* HOSTAPD */
msg = nlmsg_alloc();
-@@ -3811,7 +3811,8 @@ static int nl80211_create_iface_once(str
+@@ -3838,7 +3840,8 @@ static int nl80211_create_iface_once(str
#ifdef HOSTAPD
/* start listening for EAPOL on this interface */
diff --git a/package/hostapd/patches/330-multicall_bridge_fix.patch b/package/hostapd/patches/330-multicall_bridge_fix.patch
index 96456ea..b670122 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
-@@ -464,6 +464,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -466,6 +466,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,
-@@ -535,6 +539,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -537,6 +541,10 @@ static void wpa_driver_nl80211_event_rtm
attrlen = len;
attr = (struct rtattr *) buf;
@@ -22,8 +22,8 @@
rta_len = RTA_ALIGN(sizeof(struct rtattr));
while (RTA_OK(attr, attrlen)) {
if (attr->rta_type == IFLA_IFNAME) {
-@@ -1610,6 +1618,11 @@ static int wpa_driver_nl80211_capa(struc
- drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
+@@ -1636,6 +1644,11 @@ static int wpa_driver_nl80211_capa(struc
+ drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
drv->capa.max_remain_on_chan = info.max_remain_on_chan;
+#ifdef HOSTAPD
@@ -34,7 +34,7 @@
return 0;
}
-@@ -5602,8 +5615,6 @@ static void *i802_init(struct hostapd_da
+@@ -5623,8 +5636,6 @@ static void *i802_init(struct hostapd_da
br_ifindex = 0;
}
diff --git a/package/hostapd/patches/350-hostap_multicall_fix.patch b/package/hostapd/patches/350-hostap_multicall_fix.patch
index a4b6cc6..20c5060 100644
--- a/package/hostapd/patches/350-hostap_multicall_fix.patch
+++ b/package/hostapd/patches/350-hostap_multicall_fix.patch
@@ -40,7 +40,7 @@
static int hostapd_ioctl(void *priv, struct prism2_hostapd_param *param,
int len);
static int hostap_set_iface_flags(void *priv, int dev_up);
-@@ -399,65 +404,6 @@ static int hostapd_ioctl(void *priv, str
+@@ -400,65 +405,6 @@ static int hostapd_ioctl(void *priv, str
}
@@ -106,7 +106,7 @@
static int hostap_get_seqnum(const char *ifname, void *priv, const u8 *addr,
int idx, u8 *seq)
{
-@@ -1125,21 +1071,9 @@ static struct hostapd_hw_modes * hostap_
+@@ -1126,21 +1072,9 @@ static struct hostapd_hw_modes * hostap_
return mode;
}
@@ -130,7 +130,7 @@
struct prism2_hostapd_param *param,
int len, int show_err)
{
-@@ -1161,7 +1095,12 @@ static int hostapd_ioctl(struct wpa_driv
+@@ -1162,7 +1096,12 @@ static int hostapd_ioctl(struct wpa_driv
}
@@ -144,7 +144,7 @@
const u8 *wpa_ie, size_t wpa_ie_len)
{
struct prism2_hostapd_param *param;
-@@ -1177,7 +1116,7 @@ static int wpa_driver_hostap_set_wpa_ie(
+@@ -1178,7 +1117,7 @@ static int wpa_driver_hostap_set_wpa_ie(
param->cmd = PRISM2_HOSTAPD_SET_GENERIC_ELEMENT;
param->u.generic_elem.len = wpa_ie_len;
os_memcpy(param->u.generic_elem.data, wpa_ie, wpa_ie_len);
@@ -153,7 +153,7 @@
os_free(param);
-@@ -1185,7 +1124,7 @@ static int wpa_driver_hostap_set_wpa_ie(
+@@ -1186,7 +1125,7 @@ static int wpa_driver_hostap_set_wpa_ie(
}
@@ -162,7 +162,7 @@
int value)
{
struct iwreq iwr;
-@@ -1207,7 +1146,7 @@ static int prism2param(struct wpa_driver
+@@ -1208,7 +1147,7 @@ static int prism2param(struct wpa_driver
static int wpa_driver_hostap_set_wpa(void *priv, int enabled)
{
@@ -171,7 +171,7 @@
int ret = 0;
wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
-@@ -1223,125 +1162,15 @@ static int wpa_driver_hostap_set_wpa(voi
+@@ -1224,125 +1163,15 @@ static int wpa_driver_hostap_set_wpa(voi
}
@@ -299,7 +299,7 @@
int type)
{
struct iwreq iwr;
-@@ -1362,7 +1191,7 @@ static int wpa_driver_hostap_reset(struc
+@@ -1363,7 +1192,7 @@ static int wpa_driver_hostap_reset(struc
}
@@ -308,7 +308,7 @@
const u8 *addr, int cmd, int reason_code)
{
struct prism2_hostapd_param param;
-@@ -1377,7 +1206,7 @@ static int wpa_driver_hostap_mlme(struct
+@@ -1378,7 +1207,7 @@ static int wpa_driver_hostap_mlme(struct
os_memcpy(param.sta_addr, addr, ETH_ALEN);
param.u.mlme.cmd = cmd;
param.u.mlme.reason_code = reason_code;
@@ -317,7 +317,7 @@
if (ret == 0) {
os_sleep(0, 100000);
ret = wpa_driver_hostap_reset(drv, 2);
-@@ -1389,7 +1218,7 @@ static int wpa_driver_hostap_mlme(struct
+@@ -1390,7 +1219,7 @@ static int wpa_driver_hostap_mlme(struct
static int wpa_driver_hostap_deauthenticate(void *priv, const u8 *addr,
int reason_code)
{
@@ -326,7 +326,7 @@
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DEAUTH,
reason_code);
-@@ -1399,7 +1228,7 @@ static int wpa_driver_hostap_deauthentic
+@@ -1400,7 +1229,7 @@ static int wpa_driver_hostap_deauthentic
static int wpa_driver_hostap_disassociate(void *priv, const u8 *addr,
int reason_code)
{
@@ -335,7 +335,7 @@
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DISASSOC,
reason_code);
-@@ -1410,7 +1239,7 @@ static int
+@@ -1411,7 +1240,7 @@ static int
wpa_driver_hostap_associate(void *priv,
struct wpa_driver_associate_params *params)
{
@@ -344,7 +344,7 @@
int ret = 0;
int allow_unencrypted_eapol;
-@@ -1474,7 +1303,7 @@ wpa_driver_hostap_associate(void *priv,
+@@ -1475,7 +1304,7 @@ wpa_driver_hostap_associate(void *priv,
static int wpa_driver_hostap_scan(void *priv,
struct wpa_driver_scan_params *params)
{
@@ -353,7 +353,7 @@
struct prism2_hostapd_param param;
int ret;
const u8 *ssid = params->ssids[0].ssid;
-@@ -1495,7 +1324,7 @@ static int wpa_driver_hostap_scan(void *
+@@ -1496,7 +1325,7 @@ static int wpa_driver_hostap_scan(void *
param.cmd = PRISM2_HOSTAPD_SCAN_REQ;
param.u.scan_req.ssid_len = ssid_len;
os_memcpy(param.u.scan_req.ssid, ssid, ssid_len);
@@ -362,7 +362,7 @@
/* Not all drivers generate "scan completed" wireless event, so try to
* read results after a timeout. */
-@@ -1510,7 +1339,7 @@ static int wpa_driver_hostap_scan(void *
+@@ -1511,7 +1340,7 @@ static int wpa_driver_hostap_scan(void *
static int wpa_driver_hostap_set_auth_alg(void *priv, int auth_alg)
{
@@ -371,7 +371,7 @@
int algs = 0;
if (auth_alg & WPA_AUTH_ALG_OPEN)
-@@ -1528,35 +1357,35 @@ static int wpa_driver_hostap_set_auth_al
+@@ -1529,35 +1358,35 @@ static int wpa_driver_hostap_set_auth_al
static int wpa_driver_hostap_get_bssid(void *priv, u8 *bssid)
{
@@ -412,7 +412,7 @@
drv = os_zalloc(sizeof(*drv));
if (drv == NULL)
-@@ -1596,14 +1425,120 @@ static void * wpa_driver_hostap_init(voi
+@@ -1597,14 +1426,120 @@ static void * wpa_driver_hostap_init(voi
static void wpa_driver_hostap_deinit(void *priv)
{
@@ -535,7 +535,7 @@
const struct wpa_driver_ops wpa_driver_hostap_ops = {
-@@ -1631,7 +1566,8 @@ const struct wpa_driver_ops wpa_driver_h
+@@ -1632,7 +1567,8 @@ const struct wpa_driver_ops wpa_driver_h
.sta_clear_stats = hostap_sta_clear_stats,
.get_hw_feature_data = hostap_get_hw_feature_data,
.set_ap_wps_ie = hostap_set_ap_wps_ie,
@@ -545,7 +545,7 @@
.get_bssid = wpa_driver_hostap_get_bssid,
.get_ssid = wpa_driver_hostap_get_ssid,
.set_countermeasures = wpa_driver_hostap_set_countermeasures,
-@@ -1643,5 +1579,5 @@ const struct wpa_driver_ops wpa_driver_h
+@@ -1644,5 +1580,5 @@ const struct wpa_driver_ops wpa_driver_h
.init = wpa_driver_hostap_init,
.deinit = wpa_driver_hostap_deinit,
.set_operstate = wpa_driver_hostap_set_operstate,
diff --git a/package/hostapd/patches/500-scan_wait.patch b/package/hostapd/patches/500-scan_wait.patch
index 14dccc3..7f1c749 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
-@@ -228,6 +228,7 @@ struct hostapd_iface {
+@@ -229,6 +229,7 @@ struct hostapd_iface {
int (*for_each_interface)(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx);
@@ -22,7 +22,7 @@
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -35,6 +35,8 @@
+@@ -36,6 +36,8 @@
extern int wpa_debug_level;
extern int wpa_debug_show_keys;
extern int wpa_debug_timestamp;
@@ -31,7 +31,7 @@
struct hapd_interfaces {
-@@ -162,6 +164,15 @@ static void hostapd_logger_cb(void *ctx,
+@@ -163,6 +165,15 @@ static void hostapd_logger_cb(void *ctx,
}
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
@@ -47,7 +47,7 @@
/**
* hostapd_init - Allocate and initialize per-interface data
-@@ -183,6 +194,7 @@ static struct hostapd_iface * hostapd_in
+@@ -184,6 +195,7 @@ static struct hostapd_iface * hostapd_in
if (hapd_iface == NULL)
goto fail;
@@ -55,7 +55,7 @@
hapd_iface->reload_config = hostapd_reload_config;
hapd_iface->config_read_cb = hostapd_config_read;
hapd_iface->config_fname = os_strdup(config_file);
-@@ -391,7 +403,7 @@ static int hostapd_global_init(struct ha
+@@ -399,7 +411,7 @@ static int hostapd_global_init(struct ha
}
@@ -64,7 +64,7 @@
{
#ifdef EAP_SERVER_TNC
tncs_global_deinit();
-@@ -409,8 +421,7 @@ static void hostapd_global_deinit(const
+@@ -419,8 +431,7 @@ static void hostapd_global_deinit(const
}
@@ -74,7 +74,7 @@
{
#ifdef EAP_SERVER_TNC
int tnc = 0;
-@@ -431,11 +442,6 @@ static int hostapd_global_run(struct hap
+@@ -441,11 +452,6 @@ static int hostapd_global_run(struct hap
}
#endif /* EAP_SERVER_TNC */
@@ -86,7 +86,7 @@
eloop_run();
return 0;
-@@ -491,8 +497,7 @@ int main(int argc, char *argv[])
+@@ -501,8 +507,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces;
int ret = 1;
size_t i;
@@ -96,7 +96,7 @@
const char *log_file = NULL;
if (os_program_init())
-@@ -566,7 +571,7 @@ int main(int argc, char *argv[])
+@@ -576,7 +581,7 @@ int main(int argc, char *argv[])
goto out;
}
@@ -105,7 +105,7 @@
goto out;
ret = 0;
-@@ -577,7 +582,7 @@ int main(int argc, char *argv[])
+@@ -587,7 +592,7 @@ int main(int argc, char *argv[])
hostapd_interface_deinit_free(interfaces.iface[i]);
os_free(interfaces.iface);
diff --git a/package/hostapd/patches/510-multicall.patch b/package/hostapd/patches/510-multicall.patch
index e705792..ec4fb9b 100644
--- a/package/hostapd/patches/510-multicall.patch
+++ b/package/hostapd/patches/510-multicall.patch
@@ -132,7 +132,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -3169,8 +3169,8 @@ union wpa_event_data {
+@@ -3186,8 +3186,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -179,7 +179,7 @@
for (;;) {
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -1718,8 +1718,8 @@ static void wpa_supplicant_event_unprot_
+@@ -1734,8 +1734,8 @@ static void wpa_supplicant_event_unprot_
}
@@ -192,7 +192,7 @@
u16 reason_code = 0;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2313,6 +2313,9 @@ static void wpa_supplicant_deinit_iface(
+@@ -2311,6 +2311,9 @@ static void wpa_supplicant_deinit_iface(
wpa_drv_deinit(wpa_s);
}
@@ -202,7 +202,7 @@
/**
* wpa_supplicant_add_iface - Add a new network interface
-@@ -2496,6 +2499,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -2494,6 +2497,7 @@ struct wpa_global * wpa_supplicant_init(
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
#endif /* CONFIG_NO_WPA_MSG */
@@ -212,7 +212,7 @@
wpa_debug_open_syslog();
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -491,6 +491,9 @@ static const char * hostapd_msg_ifname_c
+@@ -501,6 +501,9 @@ static const char * hostapd_msg_ifname_c
return NULL;
}
@@ -222,7 +222,7 @@
int main(int argc, char *argv[])
{
-@@ -503,6 +506,7 @@ int main(int argc, char *argv[])
+@@ -513,6 +516,7 @@ int main(int argc, char *argv[])
if (os_program_init())
return -1;
diff --git a/package/hostapd/patches/530-rescan_immediately.patch b/package/hostapd/patches/530-rescan_immediately.patch
index b6efbb8..0c8d846 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
-@@ -953,7 +953,7 @@ static int _wpa_supplicant_event_scan_re
+@@ -958,7 +958,7 @@ static int _wpa_supplicant_event_scan_re
wpa_dbg(wpa_s, 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 dd46083..4c9bf90 100644
--- a/package/hostapd/patches/540-optional_rfkill.patch
+++ b/package/hostapd/patches/540-optional_rfkill.patch
@@ -10,7 +10,7 @@
struct wpa_driver_capa capa;
int has_capability;
-@@ -1750,7 +1752,7 @@ err1:
+@@ -1776,7 +1778,7 @@ err1:
return -1;
}
@@ -19,7 +19,7 @@
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
-@@ -1772,6 +1774,7 @@ static void wpa_driver_nl80211_rfkill_un
+@@ -1798,6 +1800,7 @@ static void wpa_driver_nl80211_rfkill_un
}
/* rtnetlink ifup handler will report interface as enabled */
}
@@ -27,7 +27,7 @@
static void nl80211_get_phy_name(struct wpa_driver_nl80211_data *drv)
-@@ -1820,7 +1823,9 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1846,7 +1849,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));
-@@ -1863,6 +1868,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1887,6 +1892,7 @@ static void * wpa_driver_nl80211_init(vo
goto failed;
}
@@ -45,7 +45,7 @@
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto failed;
-@@ -1875,6 +1881,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1899,6 +1905,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;
-@@ -1882,7 +1889,9 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1909,7 +1916,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);
-@@ -1985,10 +1994,12 @@ static int nl80211_register_action_frame
+@@ -2012,10 +2021,12 @@ static int nl80211_register_action_frame
}
@@ -76,7 +76,7 @@
static int
-@@ -2007,13 +2018,16 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2034,13 +2045,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;
-@@ -2041,8 +2055,10 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2068,8 +2082,10 @@ wpa_driver_nl80211_finish_drv_init(struc
}
if (send_rfkill_event) {
@@ -105,7 +105,7 @@
}
return 0;
-@@ -2123,7 +2139,9 @@ static void wpa_driver_nl80211_deinit(vo
+@@ -2150,7 +2166,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,7 +115,7 @@
eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
-@@ -5672,7 +5690,9 @@ static void *i802_init(struct hostapd_da
+@@ -5693,7 +5711,9 @@ static void *i802_init(struct hostapd_da
failed:
nl80211_remove_monitor_interface(drv);
diff --git a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
index bd71a7b..43c550a 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
-@@ -2065,23 +2065,41 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2092,23 +2092,41 @@ wpa_driver_nl80211_finish_drv_init(struc
}
@@ -44,7 +44,7 @@
/**
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -6529,4 +6547,5 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -6566,4 +6584,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,
@@ -52,10 +52,10 @@
};
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -2217,6 +2217,8 @@ struct wpa_driver_ops {
- const u8 *buf, size_t len);
-
- int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
+@@ -2240,6 +2240,8 @@ struct wpa_driver_ops {
+ * @signal_info: Connection info structure
+ */
+ int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
+
+ int (*stop_ap)(void *priv);
};
diff --git a/package/hostapd/patches/553-ap_sta_support.patch b/package/hostapd/patches/553-ap_sta_support.patch
index d94808e..734aa04 100644
--- a/package/hostapd/patches/553-ap_sta_support.patch
+++ b/package/hostapd/patches/553-ap_sta_support.patch
@@ -34,7 +34,7 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -122,6 +122,55 @@ extern int wpa_debug_show_keys;
+@@ -123,6 +123,55 @@ extern int wpa_debug_show_keys;
extern int wpa_debug_timestamp;
extern struct wpa_driver_ops *wpa_drivers[];
@@ -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)
{
-@@ -597,8 +646,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -598,8 +647,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
-@@ -2148,6 +2205,21 @@ static int wpa_supplicant_init_iface(str
+@@ -2154,6 +2211,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/560-disable_ctrl_iface_mib.patch b/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
index f186235..e4a2c8e 100644
--- a/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
+++ b/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
@@ -55,7 +55,7 @@
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
-@@ -2885,6 +2885,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -2896,6 +2896,7 @@ char * wpa_supplicant_ctrl_iface_process
reply_len = -1;
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
@@ -63,7 +63,7 @@
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
if (reply_len >= 0) {
-@@ -2896,6 +2897,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -2907,6 +2908,7 @@ char * wpa_supplicant_ctrl_iface_process
else
reply_len += res;
}
@@ -71,7 +71,7 @@
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
reply_len = wpa_supplicant_ctrl_iface_status(
wpa_s, buf + 6, reply, reply_size);
-@@ -3189,6 +3191,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -3200,6 +3202,7 @@ char * wpa_supplicant_ctrl_iface_process
reply_len = wpa_supplicant_ctrl_iface_bss(
wpa_s, buf + 4, reply, reply_size);
#ifdef CONFIG_AP
@@ -79,7 +79,7 @@
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
} else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -3197,6 +3200,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -3208,6 +3211,7 @@ char * wpa_supplicant_ctrl_iface_process
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
reply_size);
@@ -105,7 +105,7 @@
+#endif
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
-@@ -1866,6 +1866,7 @@ static const char * bool_txt(Boolean boo
+@@ -1876,6 +1876,7 @@ static const char * bool_txt(Boolean boo
return bool ? "TRUE" : "FALSE";
}
@@ -113,7 +113,7 @@
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
{
-@@ -2017,6 +2018,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -2027,6 +2028,7 @@ int ieee802_1x_get_mib_sta(struct hostap
return len;
}
@@ -123,7 +123,7 @@
struct sta_info *sta, int success)
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
-@@ -2470,6 +2470,7 @@ static int wpa_cipher_bits(int cipher)
+@@ -2491,6 +2491,7 @@ static int wpa_cipher_bits(int cipher)
}
}
@@ -131,7 +131,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
-@@ -2633,7 +2634,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -2654,7 +2655,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len;
}
diff --git a/package/hostapd/patches/700-random_pool_add_kernel.patch b/package/hostapd/patches/700-random_pool_add_kernel.patch
index 1edaff9..8475ac6 100644
--- a/package/hostapd/patches/700-random_pool_add_kernel.patch
+++ b/package/hostapd/patches/700-random_pool_add_kernel.patch
@@ -1,6 +1,6 @@
--- a/src/crypto/random.c
+++ b/src/crypto/random.c
-@@ -47,6 +47,8 @@
+@@ -48,6 +48,8 @@
#define EXTRACT_LEN 16
#define MIN_READY_MARK 2
@@ -9,7 +9,7 @@
static u32 pool[POOL_WORDS];
static unsigned int input_rotate = 0;
static unsigned int pool_pos = 0;
-@@ -120,7 +122,7 @@ static void random_extract(u8 *out)
+@@ -122,7 +124,7 @@ static void random_extract(u8 *out)
}
@@ -18,9 +18,9 @@
{
struct os_time t;
static unsigned int count = 0;
-@@ -260,3 +262,22 @@ void random_mark_pool_ready(void)
- wpa_printf(MSG_DEBUG, "random: Mark internal entropy pool to be "
- "ready (count=%u/%u)", own_pool_ready, MIN_READY_MARK);
+@@ -335,3 +337,22 @@ void random_deinit(void)
+ random_close_fd();
+ #endif /* __linux__ */
}
+
+#endif /* CONFIG_NO_RANDOM_POOL */
@@ -101,15 +101,17 @@
L_CFLAGS += -DRADIUS_SERVER
--- a/src/crypto/random.h
+++ b/src/crypto/random.h
-@@ -16,15 +16,14 @@
- #define RANDOM_H
-
+@@ -18,17 +18,16 @@
#ifdef CONFIG_NO_RANDOM_POOL
+ #define random_init() do { } while (0)
+ #define random_deinit() do { } while (0)
-#define random_add_randomness(b, l) do { } while (0)
#define random_get_bytes(b, l) os_get_random((b), (l))
#define random_pool_ready() 1
#define random_mark_pool_ready() do { } while (0)
#else /* CONFIG_NO_RANDOM_POOL */
+ void random_init(void);
+ void random_deinit(void);
-void random_add_randomness(const void *buf, size_t len);
int random_get_bytes(void *buf, size_t len);
int random_pool_ready(void);
diff --git a/package/hostapd/patches/710-bring_down_interface.patch b/package/hostapd/patches/710-bring_down_interface.patch
index bfd5ef6..9ee9925 100644
--- a/package/hostapd/patches/710-bring_down_interface.patch
+++ b/package/hostapd/patches/710-bring_down_interface.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -4883,9 +4883,6 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4904,9 +4904,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);
@@ -10,7 +10,7 @@
if (!ret)
break;
} else
-@@ -4898,6 +4895,8 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4919,6 +4916,8 @@ static int wpa_driver_nl80211_set_mode(v
wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while "
"interface is down");
drv->nlmode = nlmode;
diff --git a/package/hostapd/patches/730-nl80211_enable_qosdata.patch b/package/hostapd/patches/730-nl80211_enable_qosdata.patch
deleted file mode 100644
index 08bebe1..0000000
--- a/package/hostapd/patches/730-nl80211_enable_qosdata.patch
+++ /dev/null
@@ -1,195 +0,0 @@
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -4263,7 +4263,7 @@ static const u8 rfc1042_header[6] = { 0x
-
- static int wpa_driver_nl80211_hapd_send_eapol(
- void *priv, const u8 *addr, const u8 *data,
-- size_t data_len, int encrypt, const u8 *own_addr)
-+ size_t data_len, int encrypt, const u8 *own_addr, u32 flags)
- {
- struct i802_bss *bss = priv;
- struct wpa_driver_nl80211_data *drv = bss->drv;
-@@ -4271,11 +4271,7 @@ static int wpa_driver_nl80211_hapd_send_
- size_t len;
- u8 *pos;
- int res;
--#if 0 /* FIX */
-- int qos = sta->flags & WPA_STA_WMM;
--#else
-- int qos = 0;
--#endif
-+ int qos = flags & WPA_STA_WMM;
-
- len = sizeof(*hdr) + (qos ? 2 : 0) + sizeof(rfc1042_header) + 2 +
- data_len;
-@@ -4291,26 +4287,22 @@ static int wpa_driver_nl80211_hapd_send_
- hdr->frame_control |= host_to_le16(WLAN_FC_FROMDS);
- if (encrypt)
- hdr->frame_control |= host_to_le16(WLAN_FC_ISWEP);
--#if 0 /* To be enabled if qos determination is added above */
- if (qos) {
- hdr->frame_control |=
- host_to_le16(WLAN_FC_STYPE_QOS_DATA << 4);
- }
--#endif
-
- memcpy(hdr->IEEE80211_DA_FROMDS, addr, ETH_ALEN);
- memcpy(hdr->IEEE80211_BSSID_FROMDS, own_addr, ETH_ALEN);
- memcpy(hdr->IEEE80211_SA_FROMDS, own_addr, ETH_ALEN);
- pos = (u8 *) (hdr + 1);
-
--#if 0 /* To be enabled if qos determination is added above */
- if (qos) {
- /* add an empty QoS header if needed */
- pos[0] = 0;
- pos[1] = 0;
- pos += 2;
- }
--#endif
-
- memcpy(pos, rfc1042_header, sizeof(rfc1042_header));
- pos += sizeof(rfc1042_header);
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -1396,7 +1396,7 @@ struct wpa_driver_ops {
- */
- int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
- size_t data_len, int encrypt,
-- const u8 *own_addr);
-+ const u8 *own_addr, u32 flags);
-
- /**
- * sta_deauth - Deauthenticate a station (AP only)
---- a/src/drivers/driver_madwifi.c
-+++ b/src/drivers/driver_madwifi.c
-@@ -1097,7 +1097,7 @@ madwifi_wireless_event_init(struct madwi
-
- static int
- madwifi_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len,
-- int encrypt, const u8 *own_addr)
-+ int encrypt, const u8 *own_addr, u32 flags)
- {
- struct madwifi_driver_data *drv = priv;
- unsigned char buf[3000];
---- a/src/drivers/driver_test.c
-+++ b/src/drivers/driver_test.c
-@@ -175,7 +175,7 @@ test_driver_get_cli(struct wpa_driver_te
-
- static int test_driver_send_eapol(void *priv, const u8 *addr, const u8 *data,
- size_t data_len, int encrypt,
-- const u8 *own_addr)
-+ const u8 *own_addr, u32 flags)
- {
- struct test_driver_bss *dbss = priv;
- struct wpa_driver_test_data *drv = dbss->drv;
---- a/src/drivers/driver_hostap.c
-+++ b/src/drivers/driver_hostap.c
-@@ -294,7 +294,8 @@ static int hostap_send_mlme(void *priv,
-
-
- static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data,
-- size_t data_len, int encrypt, const u8 *own_addr)
-+ size_t data_len, int encrypt, const u8 *own_addr,
-+ u32 flags)
- {
- struct hostap_driver_data *drv = priv;
- struct ieee80211_hdr *hdr;
---- a/src/drivers/driver_atheros.c
-+++ b/src/drivers/driver_atheros.c
-@@ -1132,7 +1132,7 @@ atheros_wireless_event_init(struct ather
-
- static int
- atheros_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len,
-- int encrypt, const u8 *own_addr)
-+ int encrypt, const u8 *own_addr, u32 flags)
- {
- struct atheros_driver_data *drv = priv;
- unsigned char buf[3000];
---- a/src/drivers/driver_bsd.c
-+++ b/src/drivers/driver_bsd.c
-@@ -516,7 +516,7 @@ no_ie:
-
- static int
- bsd_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len,
-- int encrypt, const u8 *own_addr)
-+ int encrypt, const u8 *own_addr, u32 flags)
- {
- struct bsd_driver_data *drv = priv;
-
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -135,13 +135,14 @@ static inline int hostapd_drv_sta_remove
-
- static inline int hostapd_drv_hapd_send_eapol(struct hostapd_data *hapd,
- const u8 *addr, const u8 *data,
-- size_t data_len, int encrypt)
-+ size_t data_len, int encrypt,
-+ u32 flags)
- {
- if (hapd->driver == NULL || hapd->driver->hapd_send_eapol == NULL)
- return 0;
- return hapd->driver->hapd_send_eapol(hapd->drv_priv, addr, data,
- data_len, encrypt,
-- hapd->own_addr);
-+ hapd->own_addr, flags);
- }
-
- static inline int hostapd_drv_read_sta_data(
---- a/src/ap/ieee802_1x.c
-+++ b/src/ap/ieee802_1x.c
-@@ -73,7 +73,7 @@ static void ieee802_1x_send(struct hosta
- rsn_preauth_send(hapd, sta, buf, len);
- } else {
- hostapd_drv_hapd_send_eapol(hapd, sta->addr, buf, len,
-- encrypt);
-+ encrypt, sta->flags);
- }
-
- os_free(buf);
---- a/src/ap/wpa_auth_glue.c
-+++ b/src/ap/wpa_auth_glue.c
-@@ -243,8 +243,15 @@ static int hostapd_wpa_auth_send_eapol(v
- int encrypt)
- {
- struct hostapd_data *hapd = ctx;
-+ struct sta_info *sta;
-+ u32 flags = 0;
-+
-+ sta = ap_get_sta(hapd, addr);
-+ if (sta)
-+ flags = sta->flags;
-+
- return hostapd_drv_hapd_send_eapol(hapd, addr, data, data_len,
-- encrypt);
-+ encrypt, flags);
- }
-
-
---- a/wpa_supplicant/driver_i.h
-+++ b/wpa_supplicant/driver_i.h
-@@ -351,12 +351,12 @@ static inline int wpa_drv_sta_remove(str
- static inline int wpa_drv_hapd_send_eapol(struct wpa_supplicant *wpa_s,
- const u8 *addr, const u8 *data,
- size_t data_len, int encrypt,
-- const u8 *own_addr)
-+ const u8 *own_addr, u32 flags)
- {
- if (wpa_s->driver->hapd_send_eapol)
- return wpa_s->driver->hapd_send_eapol(wpa_s->drv_priv, addr,
- data, data_len, encrypt,
-- own_addr);
-+ own_addr, flags);
- return -1;
- }
-
---- a/src/drivers/driver_wired.c
-+++ b/src/drivers/driver_wired.c
-@@ -314,7 +314,7 @@ static int wired_init_sockets(struct wpa
-
- static int wired_send_eapol(void *priv, const u8 *addr,
- const u8 *data, size_t data_len, int encrypt,
-- const u8 *own_addr)
-+ const u8 *own_addr, u32 flags)
- {
- struct wpa_driver_wired_data *drv = priv;
- struct ieee8023_hdr *hdr;