From 62244d73ae0eeea1427f37912e2f3bae5654b60e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 22 Apr 2013 13:24:48 +0000 Subject: [PATCH] hostapd: update to 2013-04-05 Signed-off-by: Felix Fietkau SVN-Revision: 36376 --- package/network/services/hostapd/Makefile | 6 ++--- .../patches/300-nl80211_multicall_fixes.patch | 8 +++---- .../patches/310-multicall_bridge_fix.patch | 8 +++---- .../330-fix_reassoc_after_ack_failure.patch | 11 --------- .../services/hostapd/patches/400-noscan.patch | 2 +- .../hostapd/patches/410-multicall.patch | 24 +++++++++---------- .../patches/430-rescan_immediately.patch | 2 +- .../hostapd/patches/440-optional_rfkill.patch | 22 ++++++++--------- .../patches/450-reload_freq_change.patch | 2 +- .../patches/451-nl80211_del_beacon_bss.patch | 10 ++++---- .../hostapd/patches/453-ap_sta_support.patch | 21 ++++++++-------- .../patches/460-disable_ctrl_iface_mib.patch | 10 ++++---- .../480-terminate_on_setup_failure.patch | 14 +++++------ .../patches/500-random_pool_add_kernel.patch | 7 +++--- .../patches/510-bring_down_interface.patch | 4 ++-- .../530-wps_single_auth_enc_type.patch | 4 ++-- .../patches/540-dynamic_20_40_mhz.patch | 6 ++--- .../patches/560-indicate-features.patch | 10 ++++---- ...dd-new-config-params-to-be-used-with.patch | 8 +++---- ...-use-new-parameters-during-ibss-join.patch | 4 ++-- .../604-wpa_s-support-htmode-param.patch | 10 ++++---- .../hostapd/patches/620-scan_wait.patch | 12 +++++----- .../hostapd/patches/700-ubus_support.patch | 14 +++++------ 23 files changed, 105 insertions(+), 114 deletions(-) delete mode 100644 package/network/services/hostapd/patches/330-fix_reassoc_after_ack_failure.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 7024844d10..485a8fad0c 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_VERSION:=20130302 +PKG_VERSION:=20130405 PKG_RELEASE:=1 -PKG_REV:=a311c61dd664db7c1d16dd3395adf07bea6c141d +PKG_REV:=f2f66ad7e805218468aa041985dccaf8719c296e PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_PROTO:=git -PKG_MIRROR_MD5SUM:=d81d1b073521df0c608f42e2cedec60c +PKG_MIRROR_MD5SUM:=5dff9bc3b8fbd9ef8a66273d5adee5a3 PKG_MAINTAINER:=Felix Fietkau 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 6c4f46fb3e..be68ed1d44 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,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -3129,6 +3129,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3290,6 +3290,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,7 +8,7 @@ if (wpa_driver_nl80211_init_nl(drv)) { os_free(drv); -@@ -3446,17 +3447,12 @@ static void wpa_driver_nl80211_send_rfki +@@ -3607,17 +3608,12 @@ static void wpa_driver_nl80211_send_rfki wpa_supplicant_event(timeout_ctx, EVENT_INTERFACE_DISABLED, NULL); } @@ -28,7 +28,7 @@ /* * Make sure the interface starts up in station mode unless this is a * dynamically added interface (e.g., P2P) that was already configured -@@ -3475,7 +3471,7 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3636,7 +3632,7 @@ wpa_driver_nl80211_finish_drv_init(struc "interface '%s' due to rfkill", bss->ifname); drv->if_disabled = 1; @@ -37,7 +37,7 @@ } else { wpa_printf(MSG_ERROR, "nl80211: Could not set " "interface '%s' UP", bss->ifname); -@@ -3485,7 +3481,19 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3646,7 +3642,19 @@ wpa_driver_nl80211_finish_drv_init(struc netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 1, IF_OPER_DORMANT); 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 e167ba76ea..a80c041d4a 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 -@@ -897,6 +897,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -899,6 +899,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, -@@ -1004,6 +1008,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -1006,6 +1010,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) { -@@ -3131,6 +3139,11 @@ static void * wpa_driver_nl80211_init(vo +@@ -3292,6 +3300,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; -@@ -8021,8 +8034,6 @@ static void *i802_init(struct hostapd_da +@@ -8296,8 +8309,6 @@ static void *i802_init(struct hostapd_da br_ifindex = 0; } diff --git a/package/network/services/hostapd/patches/330-fix_reassoc_after_ack_failure.patch b/package/network/services/hostapd/patches/330-fix_reassoc_after_ack_failure.patch deleted file mode 100644 index a91e4aed5d..0000000000 --- a/package/network/services/hostapd/patches/330-fix_reassoc_after_ack_failure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/ap/sta_info.c -+++ b/src/ap/sta_info.c -@@ -576,7 +576,7 @@ void ap_sta_disassociate(struct hostapd_ - { - wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR, - hapd->conf->iface, MAC2STR(sta->addr)); -- sta->flags &= ~WLAN_STA_ASSOC; -+ sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK); - ap_sta_set_authorized(hapd, sta, 0); - sta->timeout_next = STA_DEAUTH; - wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout " diff --git a/package/network/services/hostapd/patches/400-noscan.patch b/package/network/services/hostapd/patches/400-noscan.patch index b1b25ffe19..18a218cb26 100644 --- a/package/network/services/hostapd/patches/400-noscan.patch +++ b/package/network/services/hostapd/patches/400-noscan.patch @@ -11,7 +11,7 @@ } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -510,6 +510,7 @@ struct hostapd_config { +@@ -511,6 +511,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 4c6f8c9258..723f5f6448 100644 --- a/package/network/services/hostapd/patches/410-multicall.patch +++ b/package/network/services/hostapd/patches/410-multicall.patch @@ -62,7 +62,7 @@ BINALL=wpa_supplicant wpa_cli -@@ -704,6 +705,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -708,6 +709,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -73,7 +73,7 @@ endif ifdef CONFIG_AP -@@ -712,9 +717,11 @@ NEED_EAP_COMMON=y +@@ -716,9 +721,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 -@@ -769,10 +776,18 @@ endif +@@ -773,10 +780,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 -@@ -1521,6 +1536,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -1525,6 +1540,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 " $@ -@@ -1591,6 +1612,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2. +@@ -1595,6 +1616,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 -@@ -3726,8 +3726,8 @@ union wpa_event_data { +@@ -3750,8 +3750,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 -@@ -2333,8 +2333,8 @@ static void wpa_supplicant_event_unprot_ +@@ -2354,8 +2354,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 -@@ -2972,6 +2972,9 @@ static void wpa_supplicant_deinit_iface( +@@ -3050,6 +3050,9 @@ static void wpa_supplicant_deinit_iface( } } @@ -202,7 +202,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -3164,6 +3167,7 @@ struct wpa_global * wpa_supplicant_init( +@@ -3244,6 +3247,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 -@@ -530,6 +530,9 @@ static int hostapd_get_global_ctrl_iface +@@ -554,6 +554,9 @@ static int hostapd_get_ctrl_iface_group( return 0; } @@ -222,13 +222,13 @@ int main(int argc, char *argv[]) { -@@ -555,6 +558,7 @@ int main(int argc, char *argv[]) +@@ -579,6 +582,7 @@ int main(int argc, char *argv[]) interfaces.global_iface_name = NULL; interfaces.global_ctrl_sock = -1; + wpa_supplicant_event = hostapd_wpa_event; for (;;) { - c = getopt(argc, argv, "Bde:f:hKP:tvg:"); + c = getopt(argc, argv, "Bde:f:hKP:tvg:G:"); if (c < 0) --- a/src/drivers/drivers.c +++ b/src/drivers/drivers.c diff --git a/package/network/services/hostapd/patches/430-rescan_immediately.patch b/package/network/services/hostapd/patches/430-rescan_immediately.patch index 082344ac28..9d5fd324c4 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 -@@ -2416,7 +2416,7 @@ static struct wpa_supplicant * wpa_suppl +@@ -2443,7 +2443,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 8ed4d99c23..8a006df913 100644 --- a/package/network/services/hostapd/patches/440-optional_rfkill.patch +++ b/package/network/services/hostapd/patches/440-optional_rfkill.patch @@ -8,9 +8,9 @@ struct rfkill_data *rfkill; +#endif struct wpa_driver_capa capa; - int has_capability; - -@@ -2967,7 +2969,7 @@ static int wpa_driver_nl80211_init_nl(st + u8 *extended_capa, *extended_capa_mask; + unsigned int extended_capa_len; +@@ -3128,7 +3130,7 @@ static int wpa_driver_nl80211_init_nl(st return 0; } @@ -19,7 +19,7 @@ static void wpa_driver_nl80211_rfkill_blocked(void *ctx) { wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked"); -@@ -2990,6 +2992,7 @@ static void wpa_driver_nl80211_rfkill_un +@@ -3151,6 +3153,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) -@@ -3118,7 +3121,9 @@ static void * wpa_driver_nl80211_init(vo +@@ -3279,7 +3282,9 @@ static void * wpa_driver_nl80211_init(vo void *global_priv) { struct wpa_driver_nl80211_data *drv; @@ -37,7 +37,7 @@ struct i802_bss *bss; if (global_priv == NULL) -@@ -3154,6 +3159,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3315,6 +3320,7 @@ static void * wpa_driver_nl80211_init(vo nl80211_get_phy_name(drv); @@ -45,7 +45,7 @@ rcfg = os_zalloc(sizeof(*rcfg)); if (rcfg == NULL) goto failed; -@@ -3166,6 +3172,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3327,6 +3333,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; -@@ -3455,10 +3462,12 @@ static void nl80211_mgmt_unsubscribe(str +@@ -3616,10 +3623,12 @@ static void nl80211_mgmt_unsubscribe(str } @@ -66,7 +66,7 @@ static int wpa_driver_nl80211_finish_drv_init_sta(struct wpa_driver_nl80211_data *drv, -@@ -3479,13 +3488,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s +@@ -3640,13 +3649,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; -@@ -3516,8 +3528,10 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3677,8 +3689,10 @@ wpa_driver_nl80211_finish_drv_init(struc return -1; if (send_rfkill_event) { @@ -95,7 +95,7 @@ } return 0; -@@ -3603,7 +3617,9 @@ static void wpa_driver_nl80211_deinit(st +@@ -3764,7 +3778,9 @@ static void wpa_driver_nl80211_deinit(st netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0, IF_OPER_UP); diff --git a/package/network/services/hostapd/patches/450-reload_freq_change.patch b/package/network/services/hostapd/patches/450-reload_freq_change.patch index bf48fe41fb..ffa757e9ca 100644 --- a/package/network/services/hostapd/patches/450-reload_freq_change.patch +++ b/package/network/services/hostapd/patches/450-reload_freq_change.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -140,6 +140,24 @@ int hostapd_reload_config(struct hostapd +@@ -156,6 +156,24 @@ int hostapd_reload_config(struct hostapd oldconf = hapd->iconf; iface->conf = newconf; 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 2eaa5dc60b..fdff9e7923 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 -@@ -3538,16 +3538,18 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3699,16 +3699,18 @@ wpa_driver_nl80211_finish_drv_init(struc } @@ -21,7 +21,7 @@ return send_and_recv_msgs(drv, msg, NULL, NULL); nla_put_failure: -@@ -3555,6 +3557,21 @@ static int wpa_driver_nl80211_del_beacon +@@ -3716,6 +3718,21 @@ static int wpa_driver_nl80211_del_beacon return -ENOBUFS; } @@ -43,15 +43,15 @@ /** * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface -@@ -9547,4 +9564,5 @@ const struct wpa_driver_ops wpa_driver_n - .send_tdls_mgmt = nl80211_send_tdls_mgmt, +@@ -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 -@@ -2071,6 +2071,9 @@ struct wpa_driver_ops { +@@ -2095,6 +2095,9 @@ struct wpa_driver_ops { */ int (*probe_req_report)(void *priv, int report); 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 df04d3d4b9..a3dff04b5f 100644 --- a/package/network/services/hostapd/patches/453-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/453-ap_sta_support.patch @@ -9,7 +9,7 @@ }; /** -@@ -305,6 +307,8 @@ struct wpa_supplicant { +@@ -306,6 +308,8 @@ struct wpa_supplicant { #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */ char bridge_ifname[16]; @@ -100,7 +100,7 @@ /* Configure default/group WEP keys for static WEP */ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { -@@ -676,8 +725,16 @@ void wpa_supplicant_set_state(struct wpa +@@ -667,8 +716,16 @@ void wpa_supplicant_set_state(struct wpa #endif /* CONFIG_P2P */ sme_sched_obss_scan(wpa_s, 1); @@ -117,7 +117,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -2778,6 +2835,21 @@ static int wpa_supplicant_init_iface(str +@@ -2853,6 +2910,21 @@ static int wpa_supplicant_init_iface(str os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname, sizeof(wpa_s->bridge_ifname)); } @@ -149,16 +149,17 @@ #include "drivers/driver.h" #include "wpa_supplicant_i.h" #include "config.h" -@@ -227,6 +228,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_ +@@ -245,6 +246,9 @@ static void calculate_update_time(const static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src, struct os_time *fetch_time) { + struct ieee80211_ht_capabilities *capab; + struct ieee802_11_elems elems; - os_time_t usec; - ++ dst->flags = src->flags; -@@ -239,6 +242,12 @@ static void wpa_bss_copy_res(struct wpa_ + os_memcpy(dst->bssid, src->bssid, ETH_ALEN); + dst->freq = src->freq; +@@ -255,6 +259,12 @@ static void wpa_bss_copy_res(struct wpa_ dst->level = src->level; dst->tsf = src->tsf; @@ -168,9 +169,9 @@ + if (capab) + dst->ht_capab = le_to_host16(capab->ht_capabilities_info); + - dst->last_update.sec = fetch_time->sec; - dst->last_update.usec = fetch_time->usec; - dst->last_update.sec -= src->age / 1000; + calculate_update_time(fetch_time, src->age, &dst->last_update); + } + --- a/wpa_supplicant/main.c +++ b/wpa_supplicant/main.c @@ -25,7 +25,7 @@ static void usage(void) 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 e5db6b4403..a51ade8295 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 @@ -43,7 +43,7 @@ reply_len = -1; --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -754,6 +754,9 @@ ifdef CONFIG_WNM +@@ -758,6 +758,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 -@@ -4933,6 +4933,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5051,6 +5051,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) { -@@ -4944,6 +4945,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5062,6 +5063,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); -@@ -5350,6 +5352,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5465,6 +5467,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) { -@@ -5358,6 +5361,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5473,6 +5476,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); 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 f9d7425965..3f8a7783ba 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 -@@ -895,11 +895,8 @@ int hostapd_setup_interface_complete(str +@@ -911,11 +911,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) { -@@ -919,7 +916,7 @@ int hostapd_setup_interface_complete(str +@@ -935,7 +932,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 @@ } } -@@ -930,7 +927,7 @@ int hostapd_setup_interface_complete(str +@@ -946,7 +943,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 @@ } } -@@ -938,14 +935,14 @@ int hostapd_setup_interface_complete(str +@@ -954,14 +951,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; -@@ -955,7 +952,7 @@ int hostapd_setup_interface_complete(str +@@ -971,7 +968,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; } -@@ -967,7 +964,7 @@ int hostapd_setup_interface_complete(str +@@ -983,7 +980,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 @@ } /* -@@ -988,6 +985,11 @@ int hostapd_setup_interface_complete(str +@@ -1004,6 +1001,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 22805371cc..ccecb2240a 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 -@@ -1222,9 +1222,8 @@ endif +@@ -1226,9 +1226,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 -@@ -1162,9 +1162,8 @@ endif +@@ -1191,9 +1191,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -143,12 +143,13 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/hostapd/Android.mk +++ b/hostapd/Android.mk -@@ -745,11 +745,11 @@ endif +@@ -775,12 +775,12 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL else -OBJS += src/crypto/random.c -HOBJS += src/crypto/random.c + HOBJS += src/utils/eloop.c HOBJS += $(SHA1OBJS) HOBJS += src/crypto/md5.c endif 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 1288e9e6db..e92c122b82 100644 --- a/package/network/services/hostapd/patches/510-bring_down_interface.patch +++ b/package/network/services/hostapd/patches/510-bring_down_interface.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7346,8 +7346,6 @@ static int wpa_driver_nl80211_set_mode(s +@@ -7616,8 +7616,6 @@ static int wpa_driver_nl80211_set_mode(s ret = nl80211_set_mode(drv, drv->ifindex, nlmode); if (ret == -EACCES) break; @@ -9,7 +9,7 @@ if (res && !ret) ret = -1; else if (ret != -EBUSY) -@@ -7363,6 +7361,7 @@ static int wpa_driver_nl80211_set_mode(s +@@ -7633,6 +7631,7 @@ static int wpa_driver_nl80211_set_mode(s "interface is down"); drv->nlmode = nlmode; drv->ignore_if_down_event = 1; diff --git a/package/network/services/hostapd/patches/530-wps_single_auth_enc_type.patch b/package/network/services/hostapd/patches/530-wps_single_auth_enc_type.patch index 51c7669ed1..6f4a6557d5 100644 --- a/package/network/services/hostapd/patches/530-wps_single_auth_enc_type.patch +++ b/package/network/services/hostapd/patches/530-wps_single_auth_enc_type.patch @@ -1,6 +1,6 @@ --- a/src/ap/wps_hostapd.c +++ b/src/ap/wps_hostapd.c -@@ -871,11 +871,9 @@ int hostapd_init_wps(struct hostapd_data +@@ -989,11 +989,9 @@ int hostapd_init_wps(struct hostapd_data if (conf->rsn_pairwise & WPA_CIPHER_CCMP) wps->encr_types |= WPS_ENCR_AES; @@ -14,7 +14,7 @@ if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) wps->auth_types |= WPS_AUTH_WPAPSK; if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) -@@ -883,7 +881,7 @@ int hostapd_init_wps(struct hostapd_data +@@ -1001,7 +999,7 @@ int hostapd_init_wps(struct hostapd_data if (conf->wpa_pairwise & WPA_CIPHER_CCMP) wps->encr_types |= WPS_ENCR_AES; 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 ce2a339346..a7b39dbe89 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 @@ -13,7 +13,7 @@ #endif /* CONFIG_IEEE80211N */ --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -514,6 +514,7 @@ struct hostapd_config { +@@ -515,6 +515,7 @@ struct hostapd_config { int ieee80211n; int secondary_channel; int require_ht; @@ -31,7 +31,7 @@ #include "ieee802_11_auth.h" #include "vlan_init.h" #include "wpa_auth.h" -@@ -332,6 +333,7 @@ static void hostapd_cleanup_iface_pre(st +@@ -348,6 +349,7 @@ static void hostapd_cleanup_iface_pre(st static void hostapd_cleanup_iface_partial(struct hostapd_iface *iface) { @@ -41,7 +41,7 @@ os_free(iface->current_rates); --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h -@@ -265,6 +265,9 @@ struct hostapd_iface { +@@ -269,6 +269,9 @@ struct hostapd_iface { /* Overlapping BSS information */ int olbc_ht; diff --git a/package/network/services/hostapd/patches/560-indicate-features.patch b/package/network/services/hostapd/patches/560-indicate-features.patch index d01e18b862..9073bd43a0 100644 --- a/package/network/services/hostapd/patches/560-indicate-features.patch +++ b/package/network/services/hostapd/patches/560-indicate-features.patch @@ -1,6 +1,6 @@ --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "utils/common.h" #include "utils/eloop.h" @@ -8,16 +8,16 @@ #include "crypto/random.h" #include "crypto/tls.h" #include "common/version.h" -@@ -560,7 +561,7 @@ int main(int argc, char *argv[]) +@@ -584,7 +585,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; for (;;) { -- c = getopt(argc, argv, "Bde:f:hKP:tvg:"); -+ c = getopt(argc, argv, "Bde:f:hKP:tg:v::"); +- c = getopt(argc, argv, "Bde:f:hKP:tvg:G:"); ++ c = getopt(argc, argv, "Bde:f:hKP:tg:G:v::"); if (c < 0) break; switch (c) { -@@ -592,6 +593,8 @@ int main(int argc, char *argv[]) +@@ -616,6 +617,8 @@ int main(int argc, char *argv[]) wpa_debug_timestamp++; break; case 'v': 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 977bce4e78..3345e557f3 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 @@ -44,7 +44,7 @@ Signed-hostap: Antonio Quartulli #include "config.h" -@@ -1369,6 +1370,97 @@ static char * wpa_config_write_p2p_clien +@@ -1376,6 +1377,97 @@ static char * wpa_config_write_p2p_clien #endif /* CONFIG_P2P */ @@ -142,7 +142,7 @@ Signed-hostap: Antonio Quartulli /* Helper macros for network block parser */ #ifdef OFFSET -@@ -1546,6 +1638,9 @@ static const struct parse_data ssid_fiel +@@ -1574,6 +1666,9 @@ static const struct parse_data ssid_fiel { INT(ap_max_inactivity) }, { INT(dtim_period) }, { INT(beacon_int) }, @@ -162,7 +162,7 @@ Signed-hostap: Antonio Quartulli #define MAX_SSID_LEN 32 -@@ -571,6 +572,10 @@ struct wpa_ssid { +@@ -600,6 +601,10 @@ struct wpa_ssid { * dereferences since it may not be updated in all cases. */ void *parent_cred; @@ -175,7 +175,7 @@ Signed-hostap: Antonio Quartulli #endif /* CONFIG_SSID_H */ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1570,15 +1570,24 @@ void wpa_supplicant_associate(struct wpa +@@ -1597,15 +1597,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 bf80185c0d..5a6eb5e447 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 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -6806,7 +6806,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -7040,7 +7040,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 int count = 0; wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex); -@@ -6839,6 +6839,37 @@ retry: +@@ -7073,6 +7073,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 00272a591a..267bde8f12 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 @@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli * bg_scan_period - Background scan period in seconds, 0 to disable --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -6870,6 +6870,22 @@ retry: +@@ -7104,6 +7104,22 @@ retry: NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate); } @@ -52,7 +52,7 @@ Signed-off-by: Antonio Quartulli goto nla_put_failure; --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c -@@ -1401,6 +1401,71 @@ static char * wpa_config_write_mcast_rat +@@ -1408,6 +1408,71 @@ static char * wpa_config_write_mcast_rat } #endif /* NO_CONFIG_WRITE */ @@ -124,7 +124,7 @@ Signed-off-by: Antonio Quartulli static int wpa_config_parse_rates(const struct parse_data *data, struct wpa_ssid *ssid, int line, const char *value) -@@ -1641,6 +1706,7 @@ static const struct parse_data ssid_fiel +@@ -1669,6 +1734,7 @@ static const struct parse_data ssid_fiel { INT_RANGE(fixed_freq, 0, 1) }, { FUNC(rates) }, { FUNC(mcast_rate) }, @@ -134,7 +134,7 @@ Signed-off-by: Antonio Quartulli #undef OFFSET --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h -@@ -576,6 +576,8 @@ struct wpa_ssid { +@@ -605,6 +605,8 @@ struct wpa_ssid { int fixed_freq; unsigned char rates[NL80211_MAX_SUPP_RATES]; double mcast_rate; @@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli #endif /* CONFIG_SSID_H */ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1586,6 +1586,8 @@ void wpa_supplicant_associate(struct wpa +@@ -1613,6 +1613,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 d9c7f30104..ac2d445a43 100644 --- a/package/network/services/hostapd/patches/620-scan_wait.patch +++ b/package/network/services/hostapd/patches/620-scan_wait.patch @@ -1,6 +1,6 @@ --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -32,6 +32,8 @@ +@@ -33,6 +33,8 @@ extern int wpa_debug_level; extern int wpa_debug_show_keys; extern int wpa_debug_timestamp; @@ -9,7 +9,7 @@ extern struct wpa_driver_ops *wpa_drivers[]; -@@ -146,6 +148,14 @@ static void hostapd_logger_cb(void *ctx, +@@ -147,6 +149,14 @@ static void hostapd_logger_cb(void *ctx, } #endif /* CONFIG_NO_HOSTAPD_LOGGER */ @@ -24,7 +24,7 @@ /** * hostapd_init - Allocate and initialize per-interface data -@@ -189,6 +199,7 @@ static struct hostapd_iface * hostapd_in +@@ -190,6 +200,7 @@ static struct hostapd_iface * hostapd_in if (hapd == NULL) goto fail; hapd->msg_ctx = hapd; @@ -32,7 +32,7 @@ } return hapd_iface; -@@ -425,8 +436,6 @@ static void hostapd_global_deinit(const +@@ -429,8 +440,6 @@ static void hostapd_global_deinit(const #endif /* CONFIG_NATIVE_WINDOWS */ eap_server_unregister_methods(); @@ -41,7 +41,7 @@ } -@@ -452,11 +461,6 @@ static int hostapd_global_run(struct hap +@@ -456,11 +465,6 @@ static int hostapd_global_run(struct hap } #endif /* EAP_SERVER_TNC */ @@ -53,7 +53,7 @@ eloop_run(); return 0; -@@ -540,8 +544,7 @@ int main(int argc, char *argv[]) +@@ -564,8 +568,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/700-ubus_support.patch b/package/network/services/hostapd/patches/700-ubus_support.patch index ad1a45bf38..39351ca9e7 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; -@@ -71,6 +72,7 @@ struct hostapd_data { +@@ -72,6 +73,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]; -@@ -212,6 +214,7 @@ struct hostapd_iface { +@@ -213,6 +215,7 @@ struct hostapd_iface { void *owner; char *config_fname; struct hostapd_config *conf; @@ -478,7 +478,7 @@ +#endif --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -254,6 +254,7 @@ static int hostapd_broadcast_wep_set(str +@@ -270,6 +270,7 @@ static int hostapd_broadcast_wep_set(str static void hostapd_free_hapd_data(struct hostapd_data *hapd) { @@ -486,7 +486,7 @@ iapp_deinit(hapd->iapp); hapd->iapp = NULL; accounting_deinit(hapd); -@@ -818,6 +819,8 @@ static int hostapd_setup_bss(struct host +@@ -834,6 +835,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -495,7 +495,7 @@ return 0; } -@@ -900,6 +903,7 @@ int hostapd_setup_interface_complete(str +@@ -916,6 +919,7 @@ int hostapd_setup_interface_complete(str if (err) goto error; @@ -503,7 +503,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (hapd->iconf->channel) { iface->freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel); -@@ -990,6 +994,7 @@ int hostapd_setup_interface_complete(str +@@ -1006,6 +1010,7 @@ int hostapd_setup_interface_complete(str error: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -511,7 +511,7 @@ eloop_terminate(); return -1; } -@@ -1088,6 +1093,8 @@ void hostapd_interface_deinit_free(struc +@@ -1104,6 +1109,8 @@ void hostapd_interface_deinit_free(struc void *drv_priv; if (iface == NULL) return; -- 2.25.1