summaryrefslogtreecommitdiff
path: root/package/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-21 23:02:12 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-03-21 23:02:12 +0000
commite822e203487b91e1d81f7765cabeefa81df21b80 (patch)
tree1dcaa56dfef326a89358fd33d31d235915feaecb /package/hostapd
parentb568a64f8c1f7c077c83d8c189d4c84ca270aeb4 (diff)
downloadmtk-20170518-e822e203487b91e1d81f7765cabeefa81df21b80.zip
mtk-20170518-e822e203487b91e1d81f7765cabeefa81df21b80.tar.gz
mtk-20170518-e822e203487b91e1d81f7765cabeefa81df21b80.tar.bz2
hostapd: update to 2011-02-21, use PKG_MIRROR_MD5SUM, includes fixes for WPS
SVN-Revision: 26261
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/Makefile5
-rw-r--r--package/hostapd/patches/310-madwifi_merge.patch2
-rw-r--r--package/hostapd/patches/320-nl80211_multicall_fixes.patch10
-rw-r--r--package/hostapd/patches/330-multicall_bridge_fix.patch8
-rw-r--r--package/hostapd/patches/340-madwifi_key_fixes.patch55
-rw-r--r--package/hostapd/patches/500-scan_wait.patch22
-rw-r--r--package/hostapd/patches/510-multicall.patch62
-rw-r--r--package/hostapd/patches/530-rescan_immediately.patch4
-rw-r--r--package/hostapd/patches/540-optional_rfkill.patch30
-rw-r--r--package/hostapd/patches/550-reload_freq_change.patch2
-rw-r--r--package/hostapd/patches/551-nl80211_del_beacon_bss.patch12
-rw-r--r--package/hostapd/patches/552-ctrl_iface_reload.patch2
-rw-r--r--package/hostapd/patches/553-ap_sta_support.patch8
-rw-r--r--package/hostapd/patches/560-disable_ctrl_iface_mib.patch36
-rw-r--r--package/hostapd/patches/600-terminate_on_setup_failure.patch16
-rw-r--r--package/hostapd/patches/710-bring_down_interface.patch4
-rw-r--r--package/hostapd/patches/720-fix_wps_pin_crash.patch12
17 files changed, 165 insertions, 125 deletions
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile
index 6fcd998..b232b31 100644
--- a/package/hostapd/Makefile
+++ b/package/hostapd/Makefile
@@ -8,15 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
-PKG_VERSION:=20110117
+PKG_VERSION:=20110221
PKG_RELEASE:=1
-PKG_REV:=cbcf92b42f237190b006ca8c3078593a58cbeac6
+PKG_REV:=cd9fc7869aa1e3935c028d4032d15c75e9946410
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_BUILD_DEPENDS:= \
PACKAGE_kmod-madwifi:madwifi \
diff --git a/package/hostapd/patches/310-madwifi_merge.patch b/package/hostapd/patches/310-madwifi_merge.patch
index adeb61b..f0888f0 100644
--- a/package/hostapd/patches/310-madwifi_merge.patch
+++ b/package/hostapd/patches/310-madwifi_merge.patch
@@ -769,7 +769,7 @@
};
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
-@@ -168,8 +168,8 @@ DRV_WPA_OBJS += ../src/drivers/driver_ro
+@@ -144,8 +144,8 @@ DRV_WPA_OBJS += ../src/drivers/driver_ro
endif
ifdef CONFIG_WIRELESS_EXTENSION
diff --git a/package/hostapd/patches/320-nl80211_multicall_fixes.patch b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
index 5644d6b..9bd7369 100644
--- a/package/hostapd/patches/320-nl80211_multicall_fixes.patch
+++ b/package/hostapd/patches/320-nl80211_multicall_fixes.patch
@@ -8,7 +8,7 @@
struct wiphy_info_data {
int max_scan_ssids;
int ap_supported;
-@@ -1592,7 +1591,6 @@ static int wpa_driver_nl80211_capa(struc
+@@ -1613,7 +1612,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)
-@@ -1804,6 +1802,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1825,6 +1823,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);
-@@ -1967,32 +1966,32 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -1988,32 +1987,32 @@ wpa_driver_nl80211_finish_drv_init(struc
drv->ifindex = if_nametoindex(bss->ifname);
drv->first_bss.ifindex = drv->ifindex;
@@ -80,7 +80,7 @@
if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
return -1;
-@@ -3719,7 +3718,8 @@ static void nl80211_remove_iface(struct
+@@ -3738,7 +3737,8 @@ static void nl80211_remove_iface(struct
#ifdef HOSTAPD
/* stop listening for EAPOL on this interface */
@@ -90,7 +90,7 @@
#endif /* HOSTAPD */
msg = nlmsg_alloc();
-@@ -3792,7 +3792,8 @@ static int nl80211_create_iface_once(str
+@@ -3811,7 +3811,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 5e930f7..96456ea 100644
--- a/package/hostapd/patches/330-multicall_bridge_fix.patch
+++ b/package/hostapd/patches/330-multicall_bridge_fix.patch
@@ -22,9 +22,9 @@
rta_len = RTA_ALIGN(sizeof(struct rtattr));
while (RTA_OK(attr, attrlen)) {
if (attr->rta_type == IFLA_IFNAME) {
-@@ -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;
+@@ -1610,6 +1618,11 @@ static int wpa_driver_nl80211_capa(struc
+ drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
+ drv->capa.max_remain_on_chan = info.max_remain_on_chan;
+#ifdef HOSTAPD
+ drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
@@ -34,7 +34,7 @@
return 0;
}
-@@ -5561,8 +5574,6 @@ static void *i802_init(struct hostapd_da
+@@ -5602,8 +5615,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 5d2e9c1..ab4d057 100644
--- a/package/hostapd/patches/340-madwifi_key_fixes.patch
+++ b/package/hostapd/patches/340-madwifi_key_fixes.patch
@@ -1,19 +1,54 @@
--- a/src/drivers/driver_madwifi.c
+++ b/src/drivers/driver_madwifi.c
-@@ -463,15 +463,30 @@ madwifi_set_key(const char *ifname, void
- memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
+@@ -439,7 +439,11 @@ madwifi_set_key(const char *ifname, void
+ __func__, alg, ether_sprintf(addr), key_idx);
+
+ if (alg == WPA_ALG_WEP)
++ {
+ cipher = IEEE80211_CIPHER_WEP;
++ if ((!addr || !memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN)) && drv->wext)
++ return wpa_driver_wext_set_key(ifname, drv->wext, alg, addr, key_idx, set_tx, seq, seq_len, key, key_len);
++ }
+ else if (alg == WPA_ALG_TKIP)
+ cipher = IEEE80211_CIPHER_TKIP;
+ else if (alg == WPA_ALG_CCMP)
+@@ -458,20 +462,45 @@ madwifi_set_key(const char *ifname, void
+
+ memset(&wk, 0, sizeof(wk));
+ wk.ik_type = cipher;
+- wk.ik_flags = IEEE80211_KEY_RECV | IEEE80211_KEY_XMIT;
+- if (addr == NULL || is_broadcast_ether_addr(addr)) {
+- memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
++ wk.ik_flags = IEEE80211_KEY_RECV;
++ if (set_tx)
++ wk.ik_flags |= IEEE80211_KEY_XMIT;
++ if (addr == NULL) {
++ os_memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN);
wk.ik_keyix = key_idx;
- wk.ik_flags |= IEEE80211_KEY_DEFAULT;
-+ wk.ik_flags |= IEEE80211_KEY_GROUP;
- } else if (!memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN)) {
-+ wk.ik_keyix = key_idx;
- wk.ik_flags |= IEEE80211_KEY_GROUP;
+- wk.ik_flags |= IEEE80211_KEY_DEFAULT;
+- } else if (!memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN)) {
+- wk.ik_flags |= IEEE80211_KEY_GROUP;
- memcpy(wk.ik_macaddr, addr, IEEE80211_ADDR_LEN);
-+ memset(wk.ik_macaddr, 0, IEEE80211_ADDR_LEN);
} else {
- memcpy(wk.ik_macaddr, addr, IEEE80211_ADDR_LEN);
- wk.ik_keyix = IEEE80211_KEYIX_NONE;
+- memcpy(wk.ik_macaddr, addr, IEEE80211_ADDR_LEN);
+- wk.ik_keyix = IEEE80211_KEYIX_NONE;
++ os_memcpy(wk.ik_macaddr, addr, IEEE80211_ADDR_LEN);
++ /*
++ * Deduce whether group/global or unicast key by checking
++ * the address (yech). Note also that we can only mark global
++ * keys default; doing this for a unicast key is an error.
++ */
++ if (os_memcmp(addr, "\xff\xff\xff\xff\xff\xff",
++ IEEE80211_ADDR_LEN) == 0) {
++ wk.ik_flags |= IEEE80211_KEY_GROUP;
++ wk.ik_keyix = key_idx;
++ } else {
++ wk.ik_keyix = key_idx == 0 ? IEEE80211_KEYIX_NONE :
++ key_idx;
++ }
}
++ if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx)
++ wk.ik_flags |= IEEE80211_KEY_DEFAULT;
wk.ik_keylen = key_len;
memcpy(wk.ik_keydata, key, key_len);
+#ifdef WORDS_BIGENDIAN
diff --git a/package/hostapd/patches/500-scan_wait.patch b/package/hostapd/patches/500-scan_wait.patch
index 506502a..14dccc3 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
-@@ -221,6 +221,7 @@ struct hostapd_iface {
+@@ -228,6 +228,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
-@@ -779,6 +779,9 @@ int hostapd_setup_interface_complete(str
+@@ -790,6 +790,9 @@ int hostapd_setup_interface_complete(str
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
@@ -86,17 +86,17 @@
eloop_run();
return 0;
-@@ -479,8 +485,7 @@ int main(int argc, char *argv[])
+@@ -491,8 +497,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces;
int ret = 1;
size_t i;
- int c, debug = 0, daemonize = 0;
- char *pid_file = NULL;
+ int c, debug = 0;
+ const char *log_file = NULL;
if (os_program_init())
- return -1;
-@@ -545,7 +550,7 @@ int main(int argc, char *argv[])
+@@ -566,7 +571,7 @@ int main(int argc, char *argv[])
goto out;
}
@@ -105,7 +105,7 @@
goto out;
ret = 0;
-@@ -556,7 +561,7 @@ int main(int argc, char *argv[])
+@@ -577,7 +582,7 @@ int main(int argc, char *argv[])
hostapd_interface_deinit_free(interfaces.iface[i]);
os_free(interfaces.iface);
@@ -113,10 +113,10 @@
+ hostapd_global_deinit();
os_free(pid_file);
- os_program_deinit();
+ if (log_file)
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
-@@ -1890,6 +1890,8 @@ struct hostapd_config * hostapd_config_r
+@@ -1891,6 +1891,8 @@ struct hostapd_config * hostapd_config_r
}
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_IEEE80211N
@@ -127,17 +127,17 @@
} else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
-@@ -382,6 +382,7 @@ struct hostapd_config {
+@@ -389,6 +389,7 @@ struct hostapd_config {
int ht_op_mode_fixed;
u16 ht_capab;
+ int noscan;
int ieee80211n;
int secondary_channel;
- };
+ int require_ht;
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
-@@ -460,7 +460,7 @@ static int ieee80211n_check_40mhz(struct
+@@ -463,7 +463,7 @@ static int ieee80211n_check_40mhz(struct
{
struct wpa_driver_scan_params params;
diff --git a/package/hostapd/patches/510-multicall.patch b/package/hostapd/patches/510-multicall.patch
index 4e239c2..e705792 100644
--- a/package/hostapd/patches/510-multicall.patch
+++ b/package/hostapd/patches/510-multicall.patch
@@ -26,7 +26,7 @@
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
-@@ -775,6 +780,12 @@ install: all
+@@ -780,6 +785,12 @@ install: all
BCHECK=../src/drivers/build.hostapd
@@ -37,9 +37,9 @@
+ @$(AR) cr $@ hostapd_multi.o $(OBJS)
+
hostapd: $(BCHECK) $(OBJS)
- $(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
-
-@@ -813,6 +824,12 @@ HOBJS += ../src/crypto/aes-internal.o
+ $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
+ @$(E) " LD " $@
+@@ -820,6 +831,12 @@ HOBJS += ../src/crypto/aes-internal.o
HOBJS += ../src/crypto/aes-internal-enc.o
endif
@@ -50,8 +50,8 @@
+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " "
+
nt_password_hash: $(NOBJS)
- $(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
-
+ $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
+ @$(E) " LD " $@
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -53,6 +53,7 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr
@@ -62,7 +62,7 @@
ifndef CONFIG_OS
ifdef CONFIG_NATIVE_WINDOWS
-@@ -627,6 +628,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -634,6 +635,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
LIBS += -ldl -rdynamic
endif
@@ -73,7 +73,7 @@
endif
ifdef CONFIG_AP
-@@ -635,9 +640,11 @@ NEED_EAP_COMMON=y
+@@ -642,9 +647,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
-@@ -681,10 +688,18 @@ CFLAGS += -DEAP_SERVER_WSC
+@@ -688,10 +695,18 @@ CFLAGS += -DEAP_SERVER_WSC
OBJS += ../src/ap/wps_hostapd.o
OBJS += ../src/eap_server/eap_server_wsc.o
endif
@@ -104,9 +104,9 @@
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)
+@@ -1352,6 +1367,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
+ $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
+ @$(E) " LD " $@
+wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
+ $(Q)$(CC) -c -o wpa_supplicant_multi.o -Dmain=wpa_supplicant_main $(CFLAGS) main.c
@@ -115,9 +115,9 @@
+ @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
+
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
- $(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
-
-@@ -1393,6 +1414,12 @@ endif
+ $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
+ @$(E) " LD " $@
+@@ -1412,6 +1433,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
@$(E) " CC " $<
@@ -132,7 +132,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
-@@ -3103,8 +3103,8 @@ union wpa_event_data {
+@@ -3169,8 +3169,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -156,14 +156,6 @@
{
struct hostapd_data *hapd = ctx;
-@@ -526,5 +526,6 @@ void wpa_supplicant_event(void *ctx, enu
- break;
- }
- }
--
- #endif /* HOSTAPD */
-+
-+
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
@@ -825,8 +825,8 @@ static void wpa_priv_send_ft_response(st
@@ -187,7 +179,7 @@
for (;;) {
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -1679,8 +1679,8 @@ static void wpa_supplicant_event_unprot_
+@@ -1718,8 +1718,8 @@ static void wpa_supplicant_event_unprot_
}
@@ -200,8 +192,8 @@
u16 reason_code = 0;
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2332,6 +2332,9 @@ struct wpa_supplicant * wpa_supplicant_g
- return NULL;
+@@ -2313,6 +2313,9 @@ static void wpa_supplicant_deinit_iface(
+ wpa_drv_deinit(wpa_s);
}
+extern void supplicant_event(void *ctx, enum wpa_event_type event,
@@ -209,10 +201,10 @@
+
/**
- * wpa_supplicant_init - Initialize %wpa_supplicant
-@@ -2350,6 +2353,7 @@ struct wpa_global * wpa_supplicant_init(
- if (params == NULL)
- return NULL;
+ * wpa_supplicant_add_iface - Add a new network interface
+@@ -2496,6 +2499,7 @@ struct wpa_global * wpa_supplicant_init(
+ wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
+ #endif /* CONFIG_NO_WPA_MSG */
+ wpa_supplicant_event = supplicant_event;
wpa_debug_open_file(params->wpa_debug_file_path);
@@ -220,8 +212,8 @@
wpa_debug_open_syslog();
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -479,6 +479,9 @@ static void usage(void)
- exit(1);
+@@ -491,6 +491,9 @@ static const char * hostapd_msg_ifname_c
+ return NULL;
}
+void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
@@ -230,13 +222,13 @@
int main(int argc, char *argv[])
{
-@@ -490,6 +493,7 @@ int main(int argc, char *argv[])
+@@ -503,6 +506,7 @@ int main(int argc, char *argv[])
if (os_program_init())
return -1;
+ wpa_supplicant_event = hostapd_wpa_event;
for (;;) {
- c = getopt(argc, argv, "BdhKP:tv");
+ c = getopt(argc, argv, "Bdf:hKP:tv");
if (c < 0)
--- a/src/drivers/drivers.c
+++ b/src/drivers/drivers.c
diff --git a/package/hostapd/patches/530-rescan_immediately.patch b/package/hostapd/patches/530-rescan_immediately.patch
index 6629d6b..b6efbb8 100644
--- a/package/hostapd/patches/530-rescan_immediately.patch
+++ b/package/hostapd/patches/530-rescan_immediately.patch
@@ -1,7 +1,7 @@
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
-@@ -936,7 +936,7 @@ static void _wpa_supplicant_event_scan_r
- wpa_printf(MSG_DEBUG, "Setup a new network");
+@@ -953,7 +953,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 {
- int timeout_sec = 5;
diff --git a/package/hostapd/patches/540-optional_rfkill.patch b/package/hostapd/patches/540-optional_rfkill.patch
index 796a7c5..dd46083 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
-@@ -127,7 +127,9 @@ struct wpa_driver_nl80211_data {
+@@ -129,7 +129,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;
-@@ -1729,7 +1731,7 @@ err1:
+@@ -1750,7 +1752,7 @@ err1:
return -1;
}
@@ -19,7 +19,7 @@
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
{
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
-@@ -1751,6 +1753,7 @@ static void wpa_driver_nl80211_rfkill_un
+@@ -1772,6 +1774,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)
-@@ -1799,7 +1802,9 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1820,7 +1823,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));
-@@ -1842,6 +1847,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1863,6 +1868,7 @@ static void * wpa_driver_nl80211_init(vo
goto failed;
}
@@ -45,7 +45,7 @@
rcfg = os_zalloc(sizeof(*rcfg));
if (rcfg == NULL)
goto failed;
-@@ -1854,6 +1860,7 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1875,6 +1881,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;
-@@ -1861,7 +1868,9 @@ static void * wpa_driver_nl80211_init(vo
+@@ -1882,7 +1889,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);
-@@ -1964,10 +1973,12 @@ static int nl80211_register_action_frame
+@@ -1985,10 +1994,12 @@ static int nl80211_register_action_frame
}
@@ -76,7 +76,7 @@
static int
-@@ -1986,13 +1997,16 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2007,13 +2018,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;
-@@ -2020,8 +2034,10 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2041,8 +2055,10 @@ wpa_driver_nl80211_finish_drv_init(struc
}
if (send_rfkill_event) {
@@ -105,7 +105,7 @@
}
return 0;
-@@ -2102,7 +2118,9 @@ static void wpa_driver_nl80211_deinit(vo
+@@ -2123,7 +2139,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);
-@@ -5631,7 +5649,9 @@ static void *i802_init(struct hostapd_da
+@@ -5672,7 +5690,9 @@ static void *i802_init(struct hostapd_da
failed:
nl80211_remove_monitor_interface(drv);
@@ -250,8 +250,8 @@
-NEED_RFKILL=y
endif
- ifdef CONFIG_DRIVER_HERMES
-@@ -170,7 +168,6 @@ endif
+ ifdef CONFIG_DRIVER_RALINK
+@@ -146,7 +144,6 @@ endif
ifdef CONFIG_WIRELESS_EXTENSION
DRV_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
DRV_OBJS += ../src/drivers/driver_wext.o
@@ -259,7 +259,7 @@
endif
ifdef NEED_NETLINK
-@@ -183,6 +180,7 @@ endif
+@@ -159,6 +156,7 @@ endif
ifdef NEED_RFKILL
DRV_OBJS += ../src/drivers/rfkill.o
diff --git a/package/hostapd/patches/550-reload_freq_change.patch b/package/hostapd/patches/550-reload_freq_change.patch
index ddce833..ce9c1bf 100644
--- a/package/hostapd/patches/550-reload_freq_change.patch
+++ b/package/hostapd/patches/550-reload_freq_change.patch
@@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -115,6 +115,10 @@ int hostapd_reload_config(struct hostapd
+@@ -120,6 +120,10 @@ int hostapd_reload_config(struct hostapd
oldconf = hapd->iconf;
iface->conf = newconf;
diff --git a/package/hostapd/patches/551-nl80211_del_beacon_bss.patch b/package/hostapd/patches/551-nl80211_del_beacon_bss.patch
index 6e20cec..bd71a7b 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
-@@ -2044,23 +2044,41 @@ wpa_driver_nl80211_finish_drv_init(struc
+@@ -2065,23 +2065,41 @@ wpa_driver_nl80211_finish_drv_init(struc
}
@@ -44,7 +44,7 @@
/**
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
-@@ -6456,4 +6474,5 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -6529,4 +6547,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
-@@ -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);
+@@ -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);
+
+ 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 9dcf49d..a780f7d 100644
--- a/package/hostapd/patches/552-ctrl_iface_reload.patch
+++ b/package/hostapd/patches/552-ctrl_iface_reload.patch
@@ -83,7 +83,7 @@
#ifdef CONFIG_IEEE80211W
#ifdef NEED_AP_MLME
-@@ -819,6 +881,10 @@ static void hostapd_ctrl_iface_receive(i
+@@ -822,6 +884,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 c563618..d94808e 100644
--- a/package/hostapd/patches/553-ap_sta_support.patch
+++ b/package/hostapd/patches/553-ap_sta_support.patch
@@ -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)
{
-@@ -559,8 +608,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -597,8 +646,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
-@@ -2045,6 +2102,21 @@ static int wpa_supplicant_init_iface(str
+@@ -2148,6 +2205,21 @@ static int wpa_supplicant_init_iface(str
os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname,
sizeof(wpa_s->bridge_ifname));
}
@@ -139,7 +139,7 @@
#include "drivers/driver.h"
#include "wpa_supplicant_i.h"
#include "config.h"
-@@ -89,6 +90,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_
+@@ -70,6 +71,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src)
{
@@ -148,7 +148,7 @@
os_time_t usec;
dst->flags = src->flags;
-@@ -101,6 +104,12 @@ static void wpa_bss_copy_res(struct wpa_
+@@ -82,6 +85,12 @@ static void wpa_bss_copy_res(struct wpa_
dst->level = src->level;
dst->tsf = src->tsf;
diff --git a/package/hostapd/patches/560-disable_ctrl_iface_mib.patch b/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
index b71d307..f186235 100644
--- a/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
+++ b/package/hostapd/patches/560-disable_ctrl_iface_mib.patch
@@ -12,15 +12,15 @@
endif
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
-@@ -852,6 +852,7 @@ static void hostapd_ctrl_iface_receive(i
- if (os_strcmp(buf, "PING") == 0) {
- os_memcpy(reply, "PONG\n", 5);
- reply_len = 5;
+@@ -855,6 +855,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;
+#ifdef CONFIG_CTRL_IFACE_MIB
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
if (reply_len >= 0) {
-@@ -881,10 +882,12 @@ static void hostapd_ctrl_iface_receive(i
+@@ -884,10 +885,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);
-@@ -894,6 +897,7 @@ static void hostapd_ctrl_iface_receive(i
+@@ -897,6 +900,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
-@@ -668,6 +668,9 @@ ifdef CONFIG_IEEE80211N
+@@ -675,6 +675,9 @@ ifdef CONFIG_IEEE80211N
OBJS += ../src/ap/ieee802_11_ht.o
endif
ifdef CONFIG_CTRL_IFACE
@@ -55,15 +55,15 @@
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
-@@ -2788,6 +2788,7 @@ char * wpa_supplicant_ctrl_iface_process
- reply_len = 5;
+@@ -2885,6 +2885,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);
+#ifdef CONFIG_CTRL_IFACE_MIB
} else if (os_strcmp(buf, "MIB") == 0) {
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
if (reply_len >= 0) {
-@@ -2799,6 +2800,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -2896,6 +2897,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);
-@@ -3083,6 +3085,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -3189,6 +3191,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) {
-@@ -3091,6 +3094,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -3197,6 +3200,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
-@@ -1848,6 +1848,7 @@ static const char * bool_txt(Boolean boo
+@@ -1866,6 +1866,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)
{
-@@ -1999,6 +2000,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -2017,6 +2018,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
-@@ -2458,6 +2458,7 @@ static int wpa_cipher_bits(int cipher)
+@@ -2470,6 +2470,7 @@ static int wpa_cipher_bits(int cipher)
}
}
@@ -131,7 +131,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
-@@ -2619,7 +2620,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -2633,7 +2634,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len;
}
@@ -142,7 +142,7 @@
{
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
-@@ -1852,6 +1852,8 @@ static u32 wpa_cipher_suite(struct wpa_s
+@@ -1913,6 +1913,8 @@ static u32 wpa_cipher_suite(struct wpa_s
}
@@ -151,7 +151,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
+@@ -1992,6 +1994,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
return (int) len;
}
diff --git a/package/hostapd/patches/600-terminate_on_setup_failure.patch b/package/hostapd/patches/600-terminate_on_setup_failure.patch
index cc0f95e..63d3ec5 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
-@@ -709,11 +709,8 @@ int hostapd_setup_interface_complete(str
+@@ -717,11 +717,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) {
-@@ -729,7 +726,7 @@ int hostapd_setup_interface_complete(str
+@@ -737,7 +734,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 @@
}
}
-@@ -740,7 +737,7 @@ int hostapd_setup_interface_complete(str
+@@ -748,7 +745,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 @@
}
}
-@@ -748,14 +745,14 @@ int hostapd_setup_interface_complete(str
+@@ -756,14 +753,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;
-@@ -765,7 +762,7 @@ int hostapd_setup_interface_complete(str
+@@ -773,7 +770,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;
}
-@@ -777,7 +774,7 @@ int hostapd_setup_interface_complete(str
+@@ -785,7 +782,7 @@ int hostapd_setup_interface_complete(str
if (hostapd_driver_commit(hapd) < 0) {
wpa_printf(MSG_ERROR, "%s: Failed to commit driver "
"configuration", __func__);
@@ -66,8 +66,8 @@
+ goto error;
}
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
-@@ -787,6 +784,11 @@ int hostapd_setup_interface_complete(str
+ if (hapd->setup_complete_cb)
+@@ -798,6 +795,11 @@ int hostapd_setup_interface_complete(str
iface->init_complete(iface);
return 0;
diff --git a/package/hostapd/patches/710-bring_down_interface.patch b/package/hostapd/patches/710-bring_down_interface.patch
index 29f29d3..bfd5ef6 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
-@@ -4864,9 +4864,6 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4883,9 +4883,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
-@@ -4879,6 +4876,8 @@ static int wpa_driver_nl80211_set_mode(v
+@@ -4898,6 +4895,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/720-fix_wps_pin_crash.patch b/package/hostapd/patches/720-fix_wps_pin_crash.patch
new file mode 100644
index 0000000..e1a3184
--- /dev/null
+++ b/package/hostapd/patches/720-fix_wps_pin_crash.patch
@@ -0,0 +1,12 @@
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -514,6 +514,9 @@ static int hostapd_ctrl_iface_wps_ap_pin
+ char *pos;
+ const char *pin_txt;
+
++ if (!hapd->wps)
++ return -1;
++
+ pos = os_strchr(txt, ' ');
+ if (pos)
+ *pos++ = '\0';