aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-06-30 20:27:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-06-30 20:27:38 +0000
commit60b040bbafc2adf2c439e1b80cba6c6c5fd0d244 (patch)
tree5c91a56dd3f15fd180cd6dcceb2a167ae40912ce /package
parent16079fbd9a079ed723572529dfcb7f980f68e81f (diff)
downloadupstream-60b040bbafc2adf2c439e1b80cba6c6c5fd0d244.tar.gz
upstream-60b040bbafc2adf2c439e1b80cba6c6c5fd0d244.tar.bz2
upstream-60b040bbafc2adf2c439e1b80cba6c6c5fd0d244.zip
hostapd: update to latest git version
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37110
Diffstat (limited to 'package')
-rw-r--r--package/network/services/hostapd/Makefile4
-rw-r--r--package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch73
-rw-r--r--package/network/services/hostapd/patches/310-multicall_bridge_fix.patch8
-rw-r--r--package/network/services/hostapd/patches/400-noscan.patch4
-rw-r--r--package/network/services/hostapd/patches/410-multicall.patch34
-rw-r--r--package/network/services/hostapd/patches/420-timestamp_check.patch2
-rw-r--r--package/network/services/hostapd/patches/430-rescan_immediately.patch2
-rw-r--r--package/network/services/hostapd/patches/440-optional_rfkill.patch50
-rw-r--r--package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch34
-rw-r--r--package/network/services/hostapd/patches/452-ctrl_iface_reload.patch8
-rw-r--r--package/network/services/hostapd/patches/453-ap_sta_support.patch45
-rw-r--r--package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch28
-rw-r--r--package/network/services/hostapd/patches/470-wpa_ie_cap_workaround.patch4
-rw-r--r--package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch14
-rw-r--r--package/network/services/hostapd/patches/500-random_pool_add_kernel.patch6
-rw-r--r--package/network/services/hostapd/patches/510-bring_down_interface.patch24
-rw-r--r--package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch2
-rw-r--r--package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch8
-rw-r--r--package/network/services/hostapd/patches/550-limit_debug_messages.patch8
-rw-r--r--package/network/services/hostapd/patches/560-indicate-features.patch14
-rw-r--r--package/network/services/hostapd/patches/570-genl_connect_debug.patch2
-rw-r--r--package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch8
-rw-r--r--package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch4
-rw-r--r--package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch10
-rw-r--r--package/network/services/hostapd/patches/620-scan_wait.patch6
-rw-r--r--package/network/services/hostapd/patches/630-bool_fix.patch2
-rw-r--r--package/network/services/hostapd/patches/700-ubus_support.patch24
27 files changed, 231 insertions, 197 deletions
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 018e1c06d0..d3447dfca0 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
-PKG_VERSION:=20130405
+PKG_VERSION:=20130630
PKG_RELEASE:=1
-PKG_REV:=f2f66ad7e805218468aa041985dccaf8719c296e
+PKG_REV:=9e6a321815f924e1e42896538d639e62d7786f6a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
diff --git a/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch b/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch
index be68ed1d44..c34b440e83 100644
--- a/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch
+++ b/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch
@@ -1,6 +1,22 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -3290,6 +3290,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -751,7 +751,6 @@ nla_put_failure:
+ }
+
+
+-#ifndef HOSTAPD
+ static int nl80211_get_macaddr(struct i802_bss *bss)
+ {
+ struct nl_msg *msg;
+@@ -773,7 +772,6 @@ nla_put_failure:
+ nlmsg_free(msg);
+ return NL80211_IFTYPE_UNSPECIFIED;
+ }
+-#endif /* HOSTAPD */
+
+
+ static int nl80211_register_beacons(struct wpa_driver_nl80211_data *drv,
+@@ -3592,6 +3590,7 @@ static void * wpa_driver_nl80211_init(vo
drv->monitor_sock = -1;
drv->eapol_tx_sock = -1;
drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED;
@@ -8,27 +24,41 @@
if (wpa_driver_nl80211_init_nl(drv)) {
os_free(drv);
-@@ -3607,17 +3608,12 @@ static void wpa_driver_nl80211_send_rfki
- wpa_supplicant_event(timeout_ctx, EVENT_INTERFACE_DISABLED, NULL);
- }
+@@ -3982,31 +3981,16 @@ static int i802_set_iface_flags(struct i
+
--
static int
-wpa_driver_nl80211_finish_drv_init(struct wpa_driver_nl80211_data *drv)
+wpa_driver_nl80211_finish_drv_init_sta(struct wpa_driver_nl80211_data *drv,
+ int *send_rfkill_event)
{
+-#ifndef HOSTAPD
+ enum nl80211_iftype nlmode = NL80211_IFTYPE_STATION;
+-#endif /* HOSTAPD */
struct i802_bss *bss = &drv->first_bss;
- int send_rfkill_event = 0;
+ int dynamic_if;
- drv->ifindex = if_nametoindex(bss->ifname);
-- drv->first_bss.ifindex = drv->ifindex;
+- bss->ifindex = drv->ifindex;
+- bss->wdev_id = drv->global->if_add_wdevid;
+- bss->wdev_id_set = drv->global->if_add_wdevid_set;
+-
+ dynamic_if = drv->ifindex == drv->global->if_add_ifindex;
+ dynamic_if = dynamic_if || drv->global->if_add_wdevid_set;
+- drv->global->if_add_wdevid_set = 0;
+
+- if (wpa_driver_nl80211_capa(drv))
+- return -1;
+-
+- wpa_printf(MSG_DEBUG, "nl80211: interface %s in phy %s",
+- bss->ifname, drv->phyname);
-
-#ifndef HOSTAPD
- /*
- * Make sure the interface starts up in station mode unless this is a
- * dynamically added interface (e.g., P2P) that was already configured
-@@ -3636,7 +3632,7 @@ wpa_driver_nl80211_finish_drv_init(struc
+ if (dynamic_if)
+ nlmode = nl80211_get_ifmode(bss);
+
+@@ -4035,7 +4019,7 @@ wpa_driver_nl80211_finish_drv_init(struc
"interface '%s' due to rfkill",
bss->ifname);
drv->if_disabled = 1;
@@ -37,11 +67,12 @@
} else {
wpa_printf(MSG_ERROR, "nl80211: Could not set "
"interface '%s' UP", bss->ifname);
-@@ -3646,7 +3642,19 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -4045,7 +4029,30 @@ wpa_driver_nl80211_finish_drv_init(struc
netlink_send_oper_ifla(drv->global->netlink, drv->ifindex,
1, IF_OPER_DORMANT);
-#endif /* HOSTAPD */
++ return 0;
+}
+
+static int
@@ -51,10 +82,20 @@
+ int send_rfkill_event = 0;
+
+ drv->ifindex = if_nametoindex(bss->ifname);
-+ drv->first_bss.ifindex = drv->ifindex;
++ bss->ifindex = drv->ifindex;
++ bss->wdev_id = drv->global->if_add_wdevid;
++ bss->wdev_id_set = drv->global->if_add_wdevid_set;
++ drv->global->if_add_wdevid_set = 0;
++
++ if (wpa_driver_nl80211_capa(drv))
++ return -1;
++
++ wpa_printf(MSG_DEBUG, "nl80211: interface %s in phy %s",
++ bss->ifname, drv->phyname);
+
-+ if (drv->nlmode == NL80211_IFTYPE_STATION)
-+ wpa_driver_nl80211_finish_drv_init_sta(drv, &send_rfkill_event);
++ if (drv->nlmode == NL80211_IFTYPE_STATION &&
++ wpa_driver_nl80211_finish_drv_init_sta(drv, &send_rfkill_event))
++ return -1;
- if (wpa_driver_nl80211_capa(drv))
- return -1;
+ if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname,
+ bss->addr))
diff --git a/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch b/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch
index a80c041d4a..7b0aeee29a 100644
--- a/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch
+++ b/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -899,6 +899,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -1093,6 +1093,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,
-@@ -1006,6 +1010,10 @@ static void wpa_driver_nl80211_event_rtm
+@@ -1200,6 +1204,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) {
-@@ -3292,6 +3300,11 @@ static void * wpa_driver_nl80211_init(vo
+@@ -3592,6 +3600,11 @@ static void * wpa_driver_nl80211_init(vo
drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED;
drv->nlmode = NL80211_IFTYPE_STATION;
@@ -34,7 +34,7 @@
if (wpa_driver_nl80211_init_nl(drv)) {
os_free(drv);
return NULL;
-@@ -8296,8 +8309,6 @@ static void *i802_init(struct hostapd_da
+@@ -8799,8 +8812,6 @@ static void *i802_init(struct hostapd_da
br_ifindex = 0;
}
diff --git a/package/network/services/hostapd/patches/400-noscan.patch b/package/network/services/hostapd/patches/400-noscan.patch
index 18a218cb26..5ecc2d287a 100644
--- a/package/network/services/hostapd/patches/400-noscan.patch
+++ b/package/network/services/hostapd/patches/400-noscan.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2464,6 +2464,8 @@ static int hostapd_config_fill(struct ho
+@@ -2478,6 +2478,8 @@ static int hostapd_config_fill(struct ho
}
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_IEEE80211N
@@ -11,7 +11,7 @@
} else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -511,6 +511,7 @@ struct hostapd_config {
+@@ -515,6 +515,7 @@ struct hostapd_config {
int ht_op_mode_fixed;
u16 ht_capab;
diff --git a/package/network/services/hostapd/patches/410-multicall.patch b/package/network/services/hostapd/patches/410-multicall.patch
index 723f5f6448..93621ffa97 100644
--- a/package/network/services/hostapd/patches/410-multicall.patch
+++ b/package/network/services/hostapd/patches/410-multicall.patch
@@ -26,7 +26,7 @@
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
-@@ -860,6 +865,12 @@ install: all
+@@ -864,6 +869,12 @@ install: all
BCHECK=../src/drivers/build.hostapd
@@ -39,7 +39,7 @@
hostapd: $(BCHECK) $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
-@@ -898,6 +909,12 @@ HOBJS += ../src/crypto/aes-internal.o
+@@ -902,6 +913,12 @@ HOBJS += ../src/crypto/aes-internal.o
HOBJS += ../src/crypto/aes-internal-enc.o
endif
@@ -62,7 +62,7 @@
BINALL=wpa_supplicant wpa_cli
-@@ -708,6 +709,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -704,6 +705,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
LIBS += -ldl -rdynamic
endif
@@ -73,7 +73,7 @@
endif
ifdef CONFIG_AP
-@@ -716,9 +721,11 @@ NEED_EAP_COMMON=y
+@@ -712,9 +717,11 @@ NEED_EAP_COMMON=y
NEED_RSN_AUTHENTICATOR=y
CFLAGS += -DCONFIG_AP
OBJS += ap.o
@@ -85,7 +85,7 @@
OBJS += ../src/ap/hostapd.o
OBJS += ../src/ap/wpa_auth_glue.o
OBJS += ../src/ap/utils.o
-@@ -773,10 +780,18 @@ endif
+@@ -769,10 +776,18 @@ endif
ifdef CONFIG_HS20
OBJS += ../src/ap/hs20.o
endif
@@ -104,7 +104,7 @@
NEED_AES_WRAP=y
OBJS += ../src/ap/wpa_auth.o
OBJS += ../src/ap/wpa_auth_ie.o
-@@ -1525,6 +1540,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
+@@ -1521,6 +1536,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
@@ -117,7 +117,7 @@
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
@$(E) " LD " $@
-@@ -1595,6 +1616,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
+@@ -1591,6 +1612,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
%@.service: %.service.arg.in
sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
@@ -132,7 +132,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -3750,8 +3750,8 @@ union wpa_event_data {
+@@ -3861,8 +3861,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -145,7 +145,7 @@
/*
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
-@@ -714,8 +714,8 @@ static void hostapd_event_eapol_rx(struc
+@@ -715,8 +715,8 @@ static void hostapd_event_eapol_rx(struc
}
@@ -158,7 +158,7 @@
#ifndef CONFIG_NO_STDOUT_DEBUG
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
-@@ -819,8 +819,8 @@ static void wpa_priv_send_ft_response(st
+@@ -817,8 +817,8 @@ static void wpa_priv_send_ft_response(st
}
@@ -169,7 +169,7 @@
{
struct wpa_priv_interface *iface = ctx;
-@@ -962,6 +962,7 @@ int main(int argc, char *argv[])
+@@ -960,6 +960,7 @@ int main(int argc, char *argv[])
if (os_program_init())
return -1;
@@ -179,7 +179,7 @@
for (;;) {
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -2354,8 +2354,8 @@ static void wpa_supplicant_event_unprot_
+@@ -2383,8 +2383,8 @@ static void wpa_supplicant_event_unprot_
}
@@ -192,8 +192,8 @@
u16 reason_code = 0;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3050,6 +3050,9 @@ static void wpa_supplicant_deinit_iface(
- }
+@@ -3090,6 +3090,9 @@ static void wpa_supplicant_deinit_iface(
+ os_free(wpa_s);
}
+extern void supplicant_event(void *ctx, enum wpa_event_type event,
@@ -202,7 +202,7 @@
/**
* wpa_supplicant_add_iface - Add a new network interface
-@@ -3244,6 +3247,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -3281,6 +3284,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
-@@ -554,6 +554,9 @@ static int hostapd_get_ctrl_iface_group(
+@@ -562,6 +562,9 @@ static int hostapd_get_ctrl_iface_group(
return 0;
}
@@ -222,7 +222,7 @@
int main(int argc, char *argv[])
{
-@@ -579,6 +582,7 @@ int main(int argc, char *argv[])
+@@ -587,6 +590,7 @@ int main(int argc, char *argv[])
interfaces.global_iface_name = NULL;
interfaces.global_ctrl_sock = -1;
diff --git a/package/network/services/hostapd/patches/420-timestamp_check.patch b/package/network/services/hostapd/patches/420-timestamp_check.patch
index b2d4a05115..7ca9127037 100644
--- a/package/network/services/hostapd/patches/420-timestamp_check.patch
+++ b/package/network/services/hostapd/patches/420-timestamp_check.patch
@@ -1,6 +1,6 @@
--- a/src/tls/x509v3.c
+++ b/src/tls/x509v3.c
-@@ -1848,6 +1848,9 @@ int x509_certificate_chain_validate(stru
+@@ -1847,6 +1847,9 @@ int x509_certificate_chain_validate(stru
if (chain_trusted)
continue;
diff --git a/package/network/services/hostapd/patches/430-rescan_immediately.patch b/package/network/services/hostapd/patches/430-rescan_immediately.patch
index 9d5fd324c4..bc695132cc 100644
--- a/package/network/services/hostapd/patches/430-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/430-rescan_immediately.patch
@@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2443,7 +2443,7 @@ static struct wpa_supplicant * wpa_suppl
+@@ -2454,7 +2454,7 @@ static struct wpa_supplicant * wpa_suppl
if (wpa_s == NULL)
return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/440-optional_rfkill.patch b/package/network/services/hostapd/patches/440-optional_rfkill.patch
index 8a006df913..545b6bb450 100644
--- a/package/network/services/hostapd/patches/440-optional_rfkill.patch
+++ b/package/network/services/hostapd/patches/440-optional_rfkill.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -218,7 +218,9 @@ struct wpa_driver_nl80211_data {
+@@ -216,7 +216,9 @@ struct wpa_driver_nl80211_data {
int if_removed;
int if_disabled;
int ignore_if_down_event;
@@ -10,7 +10,7 @@
struct wpa_driver_capa capa;
u8 *extended_capa, *extended_capa_mask;
unsigned int extended_capa_len;
-@@ -3128,7 +3130,7 @@ static int wpa_driver_nl80211_init_nl(st
+@@ -3461,7 +3463,7 @@ static int wpa_driver_nl80211_init_nl(st
return 0;
}
@@ -19,15 +19,15 @@
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
-@@ -3151,6 +3153,7 @@ static void wpa_driver_nl80211_rfkill_un
+@@ -3484,6 +3486,7 @@ static void wpa_driver_nl80211_rfkill_un
}
/* rtnetlink ifup handler will report interface as enabled */
}
+#endif /* CONFIG_RFKILL */
- static void nl80211_get_phy_name(struct wpa_driver_nl80211_data *drv)
-@@ -3279,7 +3282,9 @@ static void * wpa_driver_nl80211_init(vo
+ static void wpa_driver_nl80211_handle_eapol_tx_status(int sock,
+@@ -3579,7 +3582,9 @@ static void * wpa_driver_nl80211_init(vo
void *global_priv)
{
struct wpa_driver_nl80211_data *drv;
@@ -37,15 +37,15 @@
struct i802_bss *bss;
if (global_priv == NULL)
-@@ -3315,6 +3320,7 @@ static void * wpa_driver_nl80211_init(vo
-
- nl80211_get_phy_name(drv);
+@@ -3613,6 +3618,7 @@ static void * wpa_driver_nl80211_init(vo
+ if (nl80211_init_bss(bss))
+ goto failed;
+#ifdef CONFIG_RFKILL
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto failed;
-@@ -3327,6 +3333,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -3625,6 +3631,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;
-@@ -3616,10 +3623,12 @@ static void nl80211_mgmt_unsubscribe(str
+@@ -3916,10 +3923,12 @@ static void nl80211_mgmt_unsubscribe(str
}
@@ -64,9 +64,9 @@
}
+#endif /* CONFIG_RFKILL */
- static int
- wpa_driver_nl80211_finish_drv_init_sta(struct wpa_driver_nl80211_data *drv,
-@@ -3640,13 +3649,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s
+
+ static void nl80211_del_p2pdev(struct i802_bss *bss)
+@@ -4027,13 +4036,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s
}
if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) {
@@ -84,7 +84,7 @@
wpa_printf(MSG_ERROR, "nl80211: Could not set "
"interface '%s' UP", bss->ifname);
return -1;
-@@ -3677,8 +3689,10 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -4072,8 +4084,10 @@ wpa_driver_nl80211_finish_drv_init(struc
return -1;
if (send_rfkill_event) {
@@ -95,7 +95,7 @@
}
return 0;
-@@ -3764,7 +3778,9 @@ static void wpa_driver_nl80211_deinit(st
+@@ -4159,7 +4173,9 @@ static void wpa_driver_nl80211_deinit(st
netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0,
IF_OPER_UP);
@@ -107,7 +107,7 @@
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
-@@ -742,7 +742,7 @@ static void wpa_driver_wext_event_rtm_de
+@@ -740,7 +740,7 @@ static void wpa_driver_wext_event_rtm_de
}
}
@@ -116,7 +116,7 @@
static void wpa_driver_wext_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "WEXT: RFKILL blocked");
-@@ -764,7 +764,7 @@ static void wpa_driver_wext_rfkill_unblo
+@@ -762,7 +762,7 @@ static void wpa_driver_wext_rfkill_unblo
}
/* rtnetlink ifup handler will report interface as enabled */
}
@@ -125,7 +125,7 @@
static void wext_get_phy_name(struct wpa_driver_wext_data *drv)
{
-@@ -810,7 +810,9 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -808,7 +808,9 @@ void * wpa_driver_wext_init(void *ctx, c
{
struct wpa_driver_wext_data *drv;
struct netlink_config *cfg;
@@ -135,7 +135,7 @@
char path[128];
struct stat buf;
-@@ -845,6 +847,7 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -843,6 +845,7 @@ void * wpa_driver_wext_init(void *ctx, c
goto err2;
}
@@ -143,7 +143,7 @@
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto err3;
-@@ -857,6 +860,7 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -855,6 +858,7 @@ void * wpa_driver_wext_init(void *ctx, c
wpa_printf(MSG_DEBUG, "WEXT: RFKILL status not available");
os_free(rcfg);
}
@@ -151,7 +151,7 @@
drv->mlme_sock = -1;
-@@ -874,7 +878,9 @@ void * wpa_driver_wext_init(void *ctx, c
+@@ -872,7 +876,9 @@ void * wpa_driver_wext_init(void *ctx, c
return drv;
err3:
@@ -161,7 +161,7 @@
netlink_deinit(drv->netlink);
err2:
close(drv->ioctl_sock);
-@@ -884,10 +890,12 @@ err1:
+@@ -882,10 +888,12 @@ err1:
}
@@ -174,7 +174,7 @@
static int wpa_driver_wext_finish_drv_init(struct wpa_driver_wext_data *drv)
-@@ -895,13 +903,16 @@ static int wpa_driver_wext_finish_drv_in
+@@ -893,13 +901,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) {
@@ -192,7 +192,7 @@
wpa_printf(MSG_ERROR, "WEXT: Could not set "
"interface '%s' UP", drv->ifname);
return -1;
-@@ -949,8 +960,10 @@ static int wpa_driver_wext_finish_drv_in
+@@ -947,8 +958,10 @@ static int wpa_driver_wext_finish_drv_in
1, IF_OPER_DORMANT);
if (send_rfkill_event) {
@@ -203,7 +203,7 @@
}
return 0;
-@@ -980,7 +993,9 @@ void wpa_driver_wext_deinit(void *priv)
+@@ -978,7 +991,9 @@ void wpa_driver_wext_deinit(void *priv)
netlink_send_oper_ifla(drv->netlink, drv->ifindex, 0, IF_OPER_UP);
netlink_deinit(drv->netlink);
diff --git a/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch
index fdff9e7923..b8e3cc38d1 100644
--- a/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch
+++ b/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -3699,16 +3699,18 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -4094,16 +4094,18 @@ wpa_driver_nl80211_finish_drv_init(struc
}
@@ -21,7 +21,7 @@
return send_and_recv_msgs(drv, msg, NULL, NULL);
nla_put_failure:
-@@ -3716,6 +3718,21 @@ static int wpa_driver_nl80211_del_beacon
+@@ -4111,6 +4113,15 @@ static int wpa_driver_nl80211_del_beacon
return -ENOBUFS;
}
@@ -34,30 +34,14 @@
+
+ return 0;
+}
-+
-+static int wpa_driver_nl80211_stop_ap(void *priv)
-+{
-+ struct i802_bss *bss = priv;
-+ return wpa_driver_nl80211_del_beacon(bss->drv);
-+}
/**
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -9855,4 +9872,5 @@ const struct wpa_driver_ops wpa_driver_n
- .tdls_oper = nl80211_tdls_oper,
- #endif /* CONFIG_TDLS */
- .update_ft_ies = wpa_driver_nl80211_update_ft_ies,
-+ .stop_ap = wpa_driver_nl80211_stop_ap,
- };
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -2095,6 +2095,9 @@ struct wpa_driver_ops {
- */
- int (*probe_req_report)(void *priv, int report);
+@@ -9528,7 +9539,6 @@ static int wpa_driver_nl80211_stop_ap(vo
+ if (!is_ap_interface(drv->nlmode))
+ return -1;
+ wpa_driver_nl80211_del_beacon(drv);
+- bss->beacon_set = 0;
+ return 0;
+ }
-+
-+ int (*stop_ap)(void *priv);
-+
- /**
- * deinit_ap - Deinitialize AP mode
- * @priv: Private driver interface data
diff --git a/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
index 85e871f457..7459a0f7cd 100644
--- a/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
+++ b/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
@@ -1,6 +1,6 @@
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -33,6 +33,7 @@
+@@ -34,6 +34,7 @@
#include "wps/wps.h"
#include "config_file.h"
#include "ctrl_iface.h"
@@ -8,7 +8,7 @@
struct wpa_ctrl_dst {
-@@ -43,6 +44,7 @@ struct wpa_ctrl_dst {
+@@ -44,6 +45,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);
-@@ -152,6 +154,68 @@ static int hostapd_ctrl_iface_new_sta(st
+@@ -153,6 +155,68 @@ static int hostapd_ctrl_iface_new_sta(st
return 0;
}
@@ -85,7 +85,7 @@
#ifdef CONFIG_IEEE80211W
#ifdef NEED_AP_MLME
-@@ -902,6 +966,10 @@ static void hostapd_ctrl_iface_receive(i
+@@ -949,6 +1013,10 @@ static void hostapd_ctrl_iface_receive(i
reply_len += res;
}
#endif /* CONFIG_NO_RADIUS */
diff --git a/package/network/services/hostapd/patches/453-ap_sta_support.patch b/package/network/services/hostapd/patches/453-ap_sta_support.patch
index a3dff04b5f..5481529014 100644
--- a/package/network/services/hostapd/patches/453-ap_sta_support.patch
+++ b/package/network/services/hostapd/patches/453-ap_sta_support.patch
@@ -1,23 +1,26 @@
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
-@@ -96,6 +96,8 @@ struct wpa_interface {
- * receiving of EAPOL frames from an additional interface.
- */
- const char *bridge_ifname;
-+
-+ const char *hostapd_ctrl;
- };
+@@ -96,6 +96,11 @@ struct wpa_interface {
+ const char *ifname;
- /**
-@@ -306,6 +308,8 @@ struct wpa_supplicant {
+ /**
++ * hostapd_ctrl - path to hostapd control socket for notification
++ */
++ const char *hostapd_ctrl;
++
++ /**
+ * bridge_ifname - Optional bridge interface name
+ *
+ * If the driver interface (ifname) is included in a Linux bridge
+@@ -328,6 +333,8 @@ struct wpa_supplicant {
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
char bridge_ifname[16];
+ struct wpa_ctrl *hostapd;
+
char *confname;
+ char *confanother;
struct wpa_config *conf;
- int countermeasures;
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -13,6 +13,10 @@ PKG_CONFIG ?= pkg-config
@@ -44,7 +47,7 @@
CONFIG_OS=win32
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -107,6 +107,55 @@ extern int wpa_debug_show_keys;
+@@ -109,6 +109,55 @@ extern int wpa_debug_show_keys;
extern int wpa_debug_timestamp;
extern struct wpa_driver_ops *wpa_drivers[];
@@ -100,7 +103,7 @@
/* Configure default/group WEP keys for static WEP */
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
{
-@@ -667,8 +716,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -675,8 +724,16 @@ void wpa_supplicant_set_state(struct wpa
#endif /* CONFIG_P2P */
sme_sched_obss_scan(wpa_s, 1);
@@ -117,7 +120,7 @@
wpa_s->new_connection = 1;
wpa_drv_set_operstate(wpa_s, 0);
#ifndef IEEE8021X_EAPOL
-@@ -2853,6 +2910,21 @@ static int wpa_supplicant_init_iface(str
+@@ -2866,6 +2923,21 @@ static int wpa_supplicant_init_iface(str
os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname,
sizeof(wpa_s->bridge_ifname));
}
@@ -174,16 +177,16 @@
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
-@@ -25,7 +25,7 @@ static void usage(void)
- "usage:\n"
+@@ -27,7 +27,7 @@ static void usage(void)
" wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] "
"[-g<global ctrl>] \\\n"
+ " [-G<group>] \\\n"
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
-+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>]"
++ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>] "
"[-p<driver_param>] \\\n"
" [-b<br_ifname>] [-f<debug file>] [-e<entropy file>] "
"\\\n"
-@@ -67,6 +67,7 @@ static void usage(void)
+@@ -72,6 +72,7 @@ static void usage(void)
#endif /* CONFIG_DEBUG_LINUX_TRACING */
printf(" -t = include timestamp in debug messages\n"
" -h = show this help text\n"
@@ -191,16 +194,16 @@
" -L = show license (BSD)\n"
" -o = override driver parameter for new interfaces\n"
" -O = override ctrl_interface parameter for new interfaces\n"
-@@ -155,7 +156,7 @@ int main(int argc, char *argv[])
+@@ -160,7 +161,7 @@ int main(int argc, char *argv[])
for (;;) {
c = getopt(argc, argv,
-- "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qsTtuvW");
-+ "b:Bc:C:D:de:f:g:hH:i:KLNo:O:p:P:qsTtuvW");
+- "b:Bc:C:D:de:f:g:G:hi:I:KLNo:O:p:P:qsTtuvW");
++ "b:Bc:C:D:de:f:g:G:hH:i:I:KLNo:O:p:P:qsTtuvW");
if (c < 0)
break;
switch (c) {
-@@ -199,6 +200,9 @@ int main(int argc, char *argv[])
+@@ -207,6 +208,9 @@ int main(int argc, char *argv[])
usage();
exitcode = 0;
goto out;
diff --git a/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch
index a51ade8295..f1d9334d5b 100644
--- a/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch
+++ b/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch
@@ -12,7 +12,7 @@
endif
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -937,6 +937,7 @@ static void hostapd_ctrl_iface_receive(i
+@@ -984,6 +984,7 @@ static void hostapd_ctrl_iface_receive(i
} else if (os_strncmp(buf, "RELOG", 5) == 0) {
if (wpa_debug_reopen_file() < 0)
reply_len = -1;
@@ -20,7 +20,7 @@
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
if (reply_len >= 0) {
-@@ -966,10 +967,12 @@ static void hostapd_ctrl_iface_receive(i
+@@ -1013,10 +1014,12 @@ static void hostapd_ctrl_iface_receive(i
reply_len += res;
}
#endif /* CONFIG_NO_RADIUS */
@@ -33,7 +33,7 @@
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
reply_size);
-@@ -979,6 +982,7 @@ static void hostapd_ctrl_iface_receive(i
+@@ -1026,6 +1029,7 @@ static void hostapd_ctrl_iface_receive(i
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
reply_size);
@@ -43,7 +43,7 @@
reply_len = -1;
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
-@@ -758,6 +758,9 @@ ifdef CONFIG_WNM
+@@ -754,6 +754,9 @@ ifdef CONFIG_WNM
OBJS += ../src/ap/wnm_ap.o
endif
ifdef CONFIG_CTRL_IFACE
@@ -55,7 +55,7 @@
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
-@@ -5051,6 +5051,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -5186,6 +5186,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) {
-@@ -5062,6 +5063,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -5197,6 +5198,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);
-@@ -5465,6 +5467,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -5600,6 +5602,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) {
-@@ -5473,6 +5476,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -5608,6 +5611,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);
@@ -112,7 +112,7 @@
+
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
-@@ -2048,6 +2048,7 @@ static const char * bool_txt(Boolean boo
+@@ -2042,6 +2042,7 @@ static const char * bool_txt(Boolean boo
return bool ? "TRUE" : "FALSE";
}
@@ -120,7 +120,7 @@
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
{
-@@ -2200,6 +2201,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -2194,6 +2195,7 @@ int ieee802_1x_get_mib_sta(struct hostap
return len;
}
@@ -130,7 +130,7 @@
struct sta_info *sta, int success)
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
-@@ -2687,6 +2687,7 @@ static const char * wpa_bool_txt(int boo
+@@ -2697,6 +2697,7 @@ static const char * wpa_bool_txt(int boo
return bool ? "TRUE" : "FALSE";
}
@@ -138,7 +138,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
-@@ -2831,7 +2832,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -2841,7 +2842,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len;
}
@@ -149,7 +149,7 @@
{
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
-@@ -1848,6 +1848,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
+@@ -1842,6 +1842,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
}
@@ -158,7 +158,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
-@@ -1931,6 +1933,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
+@@ -1925,6 +1927,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
return (int) len;
}
diff --git a/package/network/services/hostapd/patches/470-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/470-wpa_ie_cap_workaround.patch
index 974ec3ded5..00a32229d4 100644
--- a/package/network/services/hostapd/patches/470-wpa_ie_cap_workaround.patch
+++ b/package/network/services/hostapd/patches/470-wpa_ie_cap_workaround.patch
@@ -1,6 +1,6 @@
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
-@@ -965,6 +965,31 @@ const char * wpa_key_mgmt_txt(int key_mg
+@@ -959,6 +959,31 @@ const char * wpa_key_mgmt_txt(int key_mg
}
@@ -32,7 +32,7 @@
int wpa_compare_rsn_ie(int ft_initial_assoc,
const u8 *ie1, size_t ie1len,
const u8 *ie2, size_t ie2len)
-@@ -972,8 +997,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
+@@ -966,8 +991,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
if (ie1 == NULL || ie2 == NULL)
return -1;
diff --git a/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch b/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch
index 3f8a7783ba..8e042c45dc 100644
--- a/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch
+++ b/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -911,11 +911,8 @@ int hostapd_setup_interface_complete(str
+@@ -979,11 +979,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) {
-@@ -935,7 +932,7 @@ int hostapd_setup_interface_complete(str
+@@ -1003,7 +1000,7 @@ int hostapd_setup_interface_complete(str
hapd->iconf->vht_oper_centr_freq_seg1_idx)) {
wpa_printf(MSG_ERROR, "Could not set channel for "
"kernel driver");
@@ -23,7 +23,7 @@
}
}
-@@ -946,7 +943,7 @@ int hostapd_setup_interface_complete(str
+@@ -1014,7 +1011,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 @@
}
}
-@@ -954,14 +951,14 @@ int hostapd_setup_interface_complete(str
+@@ -1022,14 +1019,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;
-@@ -971,7 +968,7 @@ int hostapd_setup_interface_complete(str
+@@ -1039,7 +1036,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;
}
-@@ -983,7 +980,7 @@ int hostapd_setup_interface_complete(str
+@@ -1053,7 +1050,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 @@
}
/*
-@@ -1004,6 +1001,11 @@ int hostapd_setup_interface_complete(str
+@@ -1074,6 +1071,11 @@ int hostapd_setup_interface_complete(str
iface->bss[0]->conf->iface);
return 0;
diff --git a/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch b/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch
index ccecb2240a..21b37662c4 100644
--- a/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch
+++ b/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch
@@ -117,7 +117,7 @@
+}
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
-@@ -1226,9 +1226,8 @@ endif
+@@ -1222,9 +1222,8 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
CFLAGS += -DCONFIG_NO_RANDOM_POOL
@@ -130,7 +130,7 @@
ifeq ($(CONFIG_CTRL_IFACE), y)
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
-@@ -1191,9 +1191,8 @@ endif
+@@ -1192,9 +1192,8 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
@@ -143,7 +143,7 @@
ifeq ($(CONFIG_CTRL_IFACE), y)
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
-@@ -775,12 +775,12 @@ endif
+@@ -778,12 +778,12 @@ endif
ifdef CONFIG_NO_RANDOM_POOL
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
else
diff --git a/package/network/services/hostapd/patches/510-bring_down_interface.patch b/package/network/services/hostapd/patches/510-bring_down_interface.patch
index e92c122b82..3cfed29862 100644
--- a/package/network/services/hostapd/patches/510-bring_down_interface.patch
+++ b/package/network/services/hostapd/patches/510-bring_down_interface.patch
@@ -1,19 +1,25 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -7616,8 +7616,6 @@ static int wpa_driver_nl80211_set_mode(s
+@@ -8102,12 +8102,7 @@ static int wpa_driver_nl80211_set_mode(s
+ /* Try to set the mode again while the interface is
+ * down */
ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
- if (ret == -EACCES)
+- if (ret == -EACCES)
+- break;
+- res = i802_set_iface_flags(bss, 1);
+- if (res && !ret)
+- ret = -1;
+- else if (ret != -EBUSY)
++ if (ret != -EBUSY)
break;
-- res = linux_set_iface_flags(drv->global->ioctl_sock,
-- bss->ifname, 1);
- if (res && !ret)
- ret = -1;
- else if (ret != -EBUSY)
-@@ -7633,6 +7631,7 @@ static int wpa_driver_nl80211_set_mode(s
+ } else
+ wpa_printf(MSG_DEBUG, "nl80211: Failed to set "
+@@ -8120,6 +8115,8 @@ static int wpa_driver_nl80211_set_mode(s
"interface is down");
drv->nlmode = nlmode;
drv->ignore_if_down_event = 1;
-+ linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1);
++ if (i802_set_iface_flags(bss, 1))
++ ret = -1;
}
done:
diff --git a/package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch b/package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch
index 80d562c8c2..130bd53e08 100644
--- a/package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch
+++ b/package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch
@@ -1,6 +1,6 @@
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -479,6 +479,9 @@ static int hostapd_ctrl_iface_wps_ap_pin
+@@ -480,6 +480,9 @@ static int hostapd_ctrl_iface_wps_ap_pin
char *pos;
const char *pin_txt;
diff --git a/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch b/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch
index a7b39dbe89..d64b206574 100644
--- a/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch
+++ b/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch
@@ -1,6 +1,6 @@
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -2474,6 +2474,10 @@ static int hostapd_config_fill(struct ho
+@@ -2488,6 +2488,10 @@ static int hostapd_config_fill(struct ho
"ht_capab", line);
errors++;
}
@@ -13,7 +13,7 @@
#endif /* CONFIG_IEEE80211N */
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -515,6 +515,7 @@ struct hostapd_config {
+@@ -519,6 +519,7 @@ struct hostapd_config {
int ieee80211n;
int secondary_channel;
int require_ht;
@@ -41,7 +41,7 @@
os_free(iface->current_rates);
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
-@@ -269,6 +269,9 @@ struct hostapd_iface {
+@@ -274,6 +274,9 @@ struct hostapd_iface {
/* Overlapping BSS information */
int olbc_ht;
@@ -53,7 +53,7 @@
};
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
-@@ -1484,6 +1484,9 @@ static void handle_beacon(struct hostapd
+@@ -1513,6 +1513,9 @@ static void handle_beacon(struct hostapd
sizeof(mgmt->u.beacon)), &elems,
0);
diff --git a/package/network/services/hostapd/patches/550-limit_debug_messages.patch b/package/network/services/hostapd/patches/550-limit_debug_messages.patch
index 659e980112..aaea94137f 100644
--- a/package/network/services/hostapd/patches/550-limit_debug_messages.patch
+++ b/package/network/services/hostapd/patches/550-limit_debug_messages.patch
@@ -182,7 +182,7 @@
/*
* wpa_dbg() behaves like wpa_msg(), but it can be removed from build to reduce
-@@ -172,7 +213,12 @@ void wpa_hexdump_ascii_key(int level, co
+@@ -174,7 +215,12 @@ void wpa_hexdump_ascii_key(int level, co
*
* Note: New line '\n' is added to the end of the text when printing to stdout.
*/
@@ -196,7 +196,7 @@
/**
* wpa_msg_ctrl - Conditional printf for ctrl_iface monitors
-@@ -186,8 +232,13 @@ void wpa_msg(void *ctx, int level, const
+@@ -188,8 +234,13 @@ void wpa_msg(void *ctx, int level, const
* attached ctrl_iface monitors. In other words, it can be used for frequent
* events that do not need to be sent to syslog.
*/
@@ -209,5 +209,5 @@
+ _wpa_msg_ctrl(ctx, level, __VA_ARGS__); \
+ } while(0)
- typedef void (*wpa_msg_cb_func)(void *ctx, int level, const char *txt,
- size_t len);
+ /**
+ * wpa_msg_global - Global printf for ctrl_iface monitors
diff --git a/package/network/services/hostapd/patches/560-indicate-features.patch b/package/network/services/hostapd/patches/560-indicate-features.patch
index 9073bd43a0..a719afd1fd 100644
--- a/package/network/services/hostapd/patches/560-indicate-features.patch
+++ b/package/network/services/hostapd/patches/560-indicate-features.patch
@@ -8,7 +8,7 @@
#include "crypto/random.h"
#include "crypto/tls.h"
#include "common/version.h"
-@@ -584,7 +585,7 @@ int main(int argc, char *argv[])
+@@ -592,7 +593,7 @@ int main(int argc, char *argv[])
wpa_supplicant_event = hostapd_wpa_event;
for (;;) {
@@ -17,7 +17,7 @@
if (c < 0)
break;
switch (c) {
-@@ -616,6 +617,8 @@ int main(int argc, char *argv[])
+@@ -624,6 +625,8 @@ int main(int argc, char *argv[])
wpa_debug_timestamp++;
break;
case 'v':
@@ -35,17 +35,17 @@
+#include "build_features.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
-
-@@ -156,7 +157,7 @@ int main(int argc, char *argv[])
+ #include "p2p_supplicant.h"
+@@ -161,7 +162,7 @@ int main(int argc, char *argv[])
for (;;) {
c = getopt(argc, argv,
-- "b:Bc:C:D:de:f:g:hH:i:KLNo:O:p:P:qsTtuvW");
-+ "b:Bc:C:D:de:f:g:hH:i:KLNo:O:p:P:qsTtuv::W");
+- "b:Bc:C:D:de:f:g:G:hH:i:I:KLNo:O:p:P:qsTtuvW");
++ "b:Bc:C:D:de:f:g:G:hH:i:I:KLNo:O:p:P:qsTtuv::W");
if (c < 0)
break;
switch (c) {
-@@ -248,8 +249,12 @@ int main(int argc, char *argv[])
+@@ -259,8 +260,12 @@ int main(int argc, char *argv[])
break;
#endif /* CONFIG_DBUS */
case 'v':
diff --git a/package/network/services/hostapd/patches/570-genl_connect_debug.patch b/package/network/services/hostapd/patches/570-genl_connect_debug.patch
index 5f140489b0..5475cbe9eb 100644
--- a/package/network/services/hostapd/patches/570-genl_connect_debug.patch
+++ b/package/network/services/hostapd/patches/570-genl_connect_debug.patch
@@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -127,7 +127,7 @@ static struct nl_handle * nl_create_hand
+@@ -121,7 +121,7 @@ static struct nl_handle * nl_create_hand
}
if (genl_connect(handle)) {
diff --git a/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index 3345e557f3..f5fb8cb565 100644
--- a/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
#include "common/defs.h"
#define HOSTAPD_CHAN_DISABLED 0x00000001
-@@ -363,6 +364,11 @@ struct wpa_driver_associate_params {
+@@ -369,6 +370,11 @@ struct wpa_driver_associate_params {
*/
int freq;
@@ -44,7 +44,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
#include "config.h"
-@@ -1376,6 +1377,97 @@ static char * wpa_config_write_p2p_clien
+@@ -1374,6 +1375,97 @@ static char * wpa_config_write_p2p_clien
#endif /* CONFIG_P2P */
@@ -142,7 +142,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
/* Helper macros for network block parser */
#ifdef OFFSET
-@@ -1574,6 +1666,9 @@ static const struct parse_data ssid_fiel
+@@ -1573,6 +1665,9 @@ static const struct parse_data ssid_fiel
{ INT(ap_max_inactivity) },
{ INT(dtim_period) },
{ INT(beacon_int) },
@@ -175,7 +175,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
#endif /* CONFIG_SSID_H */
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1597,15 +1597,24 @@ void wpa_supplicant_associate(struct wpa
+@@ -1606,15 +1606,24 @@ void wpa_supplicant_associate(struct wpa
params.ssid_len = ssid->ssid_len;
}
diff --git a/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch
index 5a6eb5e447..4288e9c142 100644
--- a/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch
+++ b/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch
@@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -7040,7 +7040,7 @@ static int wpa_driver_nl80211_ibss(struc
+@@ -7525,7 +7525,7 @@ static int wpa_driver_nl80211_ibss(struc
struct wpa_driver_associate_params *params)
{
struct nl_msg *msg;
@@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
int count = 0;
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
-@@ -7073,6 +7073,37 @@ retry:
+@@ -7558,6 +7558,37 @@ retry:
wpa_printf(MSG_DEBUG, " * freq=%d", params->freq);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq);
diff --git a/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch
index 267bde8f12..2914baa748 100644
--- a/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch
+++ b/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch
@@ -16,7 +16,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -368,6 +368,8 @@ struct wpa_driver_associate_params {
+@@ -374,6 +374,8 @@ struct wpa_driver_associate_params {
int fixed_freq;
unsigned char rates[NL80211_MAX_SUPP_RATES];
int mcast_rate;
@@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* bg_scan_period - Background scan period in seconds, 0 to disable
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
-@@ -7104,6 +7104,22 @@ retry:
+@@ -7589,6 +7589,22 @@ retry:
NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
}
@@ -52,7 +52,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
goto nla_put_failure;
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
-@@ -1408,6 +1408,71 @@ static char * wpa_config_write_mcast_rat
+@@ -1406,6 +1406,71 @@ static char * wpa_config_write_mcast_rat
}
#endif /* NO_CONFIG_WRITE */
@@ -124,7 +124,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
static int wpa_config_parse_rates(const struct parse_data *data,
struct wpa_ssid *ssid, int line,
const char *value)
-@@ -1669,6 +1734,7 @@ static const struct parse_data ssid_fiel
+@@ -1668,6 +1733,7 @@ static const struct parse_data ssid_fiel
{ INT_RANGE(fixed_freq, 0, 1) },
{ FUNC(rates) },
{ FUNC(mcast_rate) },
@@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org>
#endif /* CONFIG_SSID_H */
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1613,6 +1613,8 @@ void wpa_supplicant_associate(struct wpa
+@@ -1622,6 +1622,8 @@ void wpa_supplicant_associate(struct wpa
i++;
}
params.mcast_rate = ssid->mcast_rate;
diff --git a/package/network/services/hostapd/patches/620-scan_wait.patch b/package/network/services/hostapd/patches/620-scan_wait.patch
index ac2d445a43..ea1528049c 100644
--- a/package/network/services/hostapd/patches/620-scan_wait.patch
+++ b/package/network/services/hostapd/patches/620-scan_wait.patch
@@ -32,7 +32,7 @@
}
return hapd_iface;
-@@ -429,8 +440,6 @@ static void hostapd_global_deinit(const
+@@ -437,8 +448,6 @@ static void hostapd_global_deinit(const
#endif /* CONFIG_NATIVE_WINDOWS */
eap_server_unregister_methods();
@@ -41,7 +41,7 @@
}
-@@ -456,11 +465,6 @@ static int hostapd_global_run(struct hap
+@@ -464,11 +473,6 @@ static int hostapd_global_run(struct hap
}
#endif /* EAP_SERVER_TNC */
@@ -53,7 +53,7 @@
eloop_run();
return 0;
-@@ -564,8 +568,7 @@ int main(int argc, char *argv[])
+@@ -572,8 +576,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces;
int ret = 1;
size_t i;
diff --git a/package/network/services/hostapd/patches/630-bool_fix.patch b/package/network/services/hostapd/patches/630-bool_fix.patch
index 510b000027..9a822be4dc 100644
--- a/package/network/services/hostapd/patches/630-bool_fix.patch
+++ b/package/network/services/hostapd/patches/630-bool_fix.patch
@@ -1,6 +1,6 @@
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
-@@ -2043,9 +2043,9 @@ void ieee802_1x_notify_pre_auth(struct e
+@@ -2037,9 +2037,9 @@ void ieee802_1x_notify_pre_auth(struct e
}
diff --git a/package/network/services/hostapd/patches/700-ubus_support.patch b/package/network/services/hostapd/patches/700-ubus_support.patch
index b32aefc672..c5ff795233 100644
--- a/package/network/services/hostapd/patches/700-ubus_support.patch
+++ b/package/network/services/hostapd/patches/700-ubus_support.patch
@@ -22,7 +22,7 @@
struct wpa_driver_ops;
struct wpa_ctrl_dst;
-@@ -72,6 +73,7 @@ struct hostapd_data {
+@@ -75,6 +76,7 @@ struct hostapd_data {
struct hostapd_iface *iface;
struct hostapd_config *iconf;
struct hostapd_bss_config *conf;
@@ -30,7 +30,7 @@
int interface_added; /* virtual interface added for this BSS */
u8 own_addr[ETH_ALEN];
-@@ -213,6 +215,7 @@ struct hostapd_iface {
+@@ -216,6 +218,7 @@ struct hostapd_iface {
void *owner;
char *config_fname;
struct hostapd_config *conf;
@@ -497,7 +497,7 @@
return 0;
}
-@@ -916,6 +919,7 @@ int hostapd_setup_interface_complete(str
+@@ -984,6 +987,7 @@ int hostapd_setup_interface_complete(str
if (err)
goto error;
@@ -505,7 +505,7 @@
wpa_printf(MSG_DEBUG, "Completing interface initialization");
if (hapd->iconf->channel) {
iface->freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel);
-@@ -1006,6 +1010,7 @@ int hostapd_setup_interface_complete(str
+@@ -1076,6 +1080,7 @@ int hostapd_setup_interface_complete(str
error:
wpa_printf(MSG_ERROR, "Interface initialization failed");
@@ -513,7 +513,7 @@
eloop_terminate();
return -1;
}
-@@ -1104,6 +1109,8 @@ void hostapd_interface_deinit_free(struc
+@@ -1174,6 +1179,8 @@ void hostapd_interface_deinit_free(struc
void *drv_priv;
if (iface == NULL)
return;
@@ -546,7 +546,7 @@
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
printf("handle_auth - too short payload (len=%lu)\n",
-@@ -623,6 +629,14 @@ static void handle_auth(struct hostapd_d
+@@ -633,6 +639,14 @@ static void handle_auth(struct hostapd_d
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto fail;
}
@@ -561,7 +561,7 @@
if (res == HOSTAPD_ACL_PENDING) {
wpa_printf(MSG_DEBUG, "Authentication frame from " MACSTR
" waiting for an external authentication",
-@@ -1211,13 +1225,18 @@ static void send_assoc_resp(struct hosta
+@@ -1220,13 +1234,18 @@ static void send_assoc_resp(struct hosta
static void handle_assoc(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len,
@@ -581,7 +581,7 @@
if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
sizeof(mgmt->u.assoc_req))) {
-@@ -1296,6 +1315,13 @@ static void handle_assoc(struct hostapd_
+@@ -1325,6 +1344,13 @@ static void handle_assoc(struct hostapd_
goto fail;
}
@@ -595,7 +595,7 @@
sta->capability = capab_info;
sta->listen_interval = listen_interval;
-@@ -1705,7 +1731,7 @@ void ieee802_11_mgmt(struct hostapd_data
+@@ -1734,7 +1760,7 @@ void ieee802_11_mgmt(struct hostapd_data
if (stype == WLAN_FC_STYPE_PROBE_REQ) {
@@ -604,7 +604,7 @@
return;
}
-@@ -1720,15 +1746,15 @@ void ieee802_11_mgmt(struct hostapd_data
+@@ -1749,15 +1775,15 @@ void ieee802_11_mgmt(struct hostapd_data
switch (stype) {
case WLAN_FC_STYPE_AUTH:
wpa_printf(MSG_DEBUG, "mgmt::auth");
@@ -649,9 +649,9 @@
ie = mgmt->u.probe_req.variable;
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
-@@ -489,6 +495,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -500,6 +506,12 @@ void handle_probe_req(struct hostapd_dat
}
- #endif /* CONFIG_INTERWORKING */
+ #endif /* CONFIG_P2P */
+ if (hostapd_ubus_handle_event(hapd, &req)) {
+ wpa_printf(MSG_DEBUG, "Probe request for " MACSTR " rejected by ubus handler.\n",