From: Felix Fietkau Date: Thu, 13 Sep 2012 12:38:51 +0000 (+0000) Subject: hostapd: update to 2012-09-10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5d57cd2414dbfad491943e83a0e42e229f297977;p=librecmc%2Flibrecmc.git hostapd: update to 2012-09-10 SVN-Revision: 33392 --- diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index e438ef349e..295efd0cc3 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_VERSION:=20120428 -PKG_RELEASE:=3 -PKG_REV:=1f0cc27eb98f7d1af9c64d0752238184cbdb9a24 +PKG_VERSION:=20120910 +PKG_RELEASE:=1 +PKG_REV:=762b99db7a76803d1ad274e87caa6fe870d47441 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git diff --git a/package/hostapd/patches/100-pending_work.patch b/package/hostapd/patches/100-pending_work.patch index 49e5b45f44..1c97a64caa 100644 --- a/package/hostapd/patches/100-pending_work.patch +++ b/package/hostapd/patches/100-pending_work.patch @@ -1,6 +1,6 @@ --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -1488,13 +1488,6 @@ static void handle_assoc_cb(struct hosta +@@ -1506,13 +1506,6 @@ static void handle_assoc_cb(struct hosta int new_assoc = 1; struct ieee80211_ht_capabilities ht_cap; @@ -14,7 +14,7 @@ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) : sizeof(mgmt->u.assoc_resp))) { printf("handle_assoc_cb(reassoc=%d) - too short payload " -@@ -1502,11 +1495,6 @@ static void handle_assoc_cb(struct hosta +@@ -1520,11 +1513,6 @@ static void handle_assoc_cb(struct hosta return; } @@ -26,7 +26,7 @@ sta = ap_get_sta(hapd, mgmt->da); if (!sta) { printf("handle_assoc_cb: STA " MACSTR " not found\n", -@@ -1514,6 +1502,19 @@ static void handle_assoc_cb(struct hosta +@@ -1532,6 +1520,19 @@ static void handle_assoc_cb(struct hosta return; } @@ -46,7 +46,7 @@ if (status != WLAN_STATUS_SUCCESS) goto fail; -@@ -1812,6 +1813,9 @@ void ieee802_11_rx_from_unknown(struct h +@@ -1830,6 +1831,9 @@ void ieee802_11_rx_from_unknown(struct h sta = ap_get_sta(hapd, src); if (sta && (sta->flags & WLAN_STA_ASSOC)) { @@ -58,7 +58,7 @@ "STA " MACSTR " (aid %u)", --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2601,10 +2601,10 @@ static int wpa_driver_nl80211_capa(struc +@@ -2661,10 +2661,10 @@ static int wpa_driver_nl80211_capa(struc drv->data_tx_status = info.data_tx_status; /* @@ -72,7 +72,7 @@ if (drv->device_ap_sme && drv->use_monitor) { /* -@@ -6286,8 +6286,8 @@ static int wpa_driver_nl80211_hapd_send_ +@@ -6392,8 +6392,8 @@ static int wpa_driver_nl80211_hapd_send_ pos = (u8 *) (hdr + 1); if (qos) { @@ -83,8 +83,8 @@ pos[1] = 0; pos += 2; } -@@ -7564,6 +7564,10 @@ static int i802_set_wds_sta(void *priv, - linux_set_iface_flags(drv->global->ioctl_sock, name, 1); +@@ -7698,6 +7698,10 @@ static int i802_set_wds_sta(void *priv, + } return i802_set_sta_vlan(priv, addr, name, 0); } else { + if (bridge_ifname) @@ -94,7 +94,7 @@ i802_set_sta_vlan(priv, addr, bss->ifname, 0); return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN, name); -@@ -7931,7 +7935,12 @@ static int wpa_driver_nl80211_if_remove( +@@ -8065,7 +8069,12 @@ static int wpa_driver_nl80211_if_remove( if (ifindex <= 0) return -1; @@ -107,7 +107,7 @@ if (bss->added_if_into_bridge) { if (linux_br_del_if(drv->global->ioctl_sock, bss->brname, bss->ifname) < 0) -@@ -7945,13 +7954,6 @@ static int wpa_driver_nl80211_if_remove( +@@ -8079,13 +8088,6 @@ static int wpa_driver_nl80211_if_remove( "bridge %s: %s", bss->brname, strerror(errno)); } diff --git a/package/hostapd/patches/300-nl80211_multicall_fixes.patch b/package/hostapd/patches/300-nl80211_multicall_fixes.patch index e0135df160..1d2519a937 100644 --- a/package/hostapd/patches/300-nl80211_multicall_fixes.patch +++ b/package/hostapd/patches/300-nl80211_multicall_fixes.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2931,6 +2931,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -2988,6 +2988,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); -@@ -3245,17 +3246,12 @@ static void wpa_driver_nl80211_send_rfki +@@ -3302,17 +3303,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 -@@ -3274,7 +3270,7 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3331,7 +3327,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); -@@ -3284,7 +3280,19 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3341,7 +3337,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/hostapd/patches/310-multicall_bridge_fix.patch b/package/hostapd/patches/310-multicall_bridge_fix.patch index 711f890e25..59bfe5177a 100644 --- a/package/hostapd/patches/310-multicall_bridge_fix.patch +++ b/package/hostapd/patches/310-multicall_bridge_fix.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -887,6 +887,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -893,6 +893,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, -@@ -994,6 +998,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -1000,6 +1004,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) { -@@ -2933,6 +2941,11 @@ static void * wpa_driver_nl80211_init(vo +@@ -2990,6 +2998,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; -@@ -7685,8 +7698,6 @@ static void *i802_init(struct hostapd_da +@@ -7819,8 +7832,6 @@ static void *i802_init(struct hostapd_da br_ifindex = 0; } diff --git a/package/hostapd/patches/320-madwifi_key_fixes.patch b/package/hostapd/patches/320-madwifi_key_fixes.patch index d178bfa401..45a7ac6c83 100644 --- a/package/hostapd/patches/320-madwifi_key_fixes.patch +++ b/package/hostapd/patches/320-madwifi_key_fixes.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_madwifi.c +++ b/src/drivers/driver_madwifi.c -@@ -459,7 +459,9 @@ wpa_driver_madwifi_set_key(const char *i +@@ -453,7 +453,9 @@ wpa_driver_madwifi_set_key(const char *i memset(&wk, 0, sizeof(wk)); wk.ik_type = cipher; @@ -11,7 +11,7 @@ if (addr == NULL || is_broadcast_ether_addr(addr)) { memset(wk.ik_macaddr, 0xff, IEEE80211_ADDR_LEN); wk.ik_keyix = key_idx; -@@ -471,6 +473,20 @@ wpa_driver_madwifi_set_key(const char *i +@@ -465,6 +467,20 @@ wpa_driver_madwifi_set_key(const char *i wk.ik_keylen = key_len; memcpy(wk.ik_keydata, key, key_len); diff --git a/package/hostapd/patches/400-noscan.patch b/package/hostapd/patches/400-noscan.patch new file mode 100644 index 0000000000..69d026b3da --- /dev/null +++ b/package/hostapd/patches/400-noscan.patch @@ -0,0 +1,32 @@ +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -2485,6 +2485,8 @@ static int hostapd_config_fill(struct ho + } + #endif /* CONFIG_IEEE80211W */ + #ifdef CONFIG_IEEE80211N ++ } else if (os_strcmp(buf, "noscan") == 0) { ++ conf->noscan = atoi(pos); + } else if (os_strcmp(buf, "ieee80211n") == 0) { + conf->ieee80211n = atoi(pos); + } else if (os_strcmp(buf, "ht_capab") == 0) { +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -497,6 +497,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 +@@ -493,7 +493,7 @@ static int ieee80211n_check_40mhz(struct + { + struct wpa_driver_scan_params params; + +- if (!iface->conf->secondary_channel) ++ if (!iface->conf->secondary_channel || iface->conf->noscan) + return 0; /* HT40 not used */ + + wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabling " diff --git a/package/hostapd/patches/400-scan_wait.patch b/package/hostapd/patches/400-scan_wait.patch deleted file mode 100644 index 8f16fe8ca8..0000000000 --- a/package/hostapd/patches/400-scan_wait.patch +++ /dev/null @@ -1,149 +0,0 @@ ---- a/src/ap/hostapd.h -+++ b/src/ap/hostapd.h -@@ -247,6 +247,7 @@ struct hostapd_iface { - int (*for_each_interface)(struct hapd_interfaces *interfaces, - int (*cb)(struct hostapd_iface *iface, - void *ctx), void *ctx); -+ int (*init_complete)(struct hostapd_iface *iface); - }; - - /* hostapd.c */ ---- a/src/ap/hostapd.c -+++ b/src/ap/hostapd.c -@@ -852,6 +852,9 @@ int hostapd_setup_interface_complete(str - wpa_printf(MSG_DEBUG, "%s: Setup of interface done.", - iface->bss[0]->conf->iface); - -+ if (iface->init_complete) -+ iface->init_complete(iface); -+ - return 0; - } - ---- a/hostapd/main.c -+++ b/hostapd/main.c -@@ -31,6 +31,8 @@ - extern int wpa_debug_level; - extern int wpa_debug_show_keys; - extern int wpa_debug_timestamp; -+static int daemonize = 0; -+static char *pid_file = NULL; - - extern struct wpa_driver_ops *wpa_drivers[]; - -@@ -145,6 +147,16 @@ static void hostapd_logger_cb(void *ctx, - } - #endif /* CONFIG_NO_HOSTAPD_LOGGER */ - -+static int hostapd_init_complete(struct hostapd_iface *iface) -+{ -+ if (daemonize && os_daemonize(pid_file)) { -+ perror("daemon"); -+ return -1; -+ } -+ daemonize = 0; -+ return 0; -+} -+ - - /** - * hostapd_init - Allocate and initialize per-interface data -@@ -166,6 +178,7 @@ static struct hostapd_iface * hostapd_in - if (hapd_iface == NULL) - goto fail; - -+ hapd_iface->init_complete = hostapd_init_complete; - hapd_iface->reload_config = hostapd_reload_config; - hapd_iface->config_read_cb = hostapd_config_read; - hapd_iface->config_fname = os_strdup(config_file); -@@ -419,7 +432,7 @@ static int hostapd_global_init(struct ha - } - - --static void hostapd_global_deinit(const char *pid_file) -+static void hostapd_global_deinit(void) - { - int i; - -@@ -449,8 +462,7 @@ static void hostapd_global_deinit(const - } - - --static int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize, -- const char *pid_file) -+static int hostapd_global_run(struct hapd_interfaces *iface) - { - #ifdef EAP_SERVER_TNC - int tnc = 0; -@@ -471,11 +483,6 @@ static int hostapd_global_run(struct hap - } - #endif /* EAP_SERVER_TNC */ - -- if (daemonize && os_daemonize(pid_file)) { -- perror("daemon"); -- return -1; -- } -- - eloop_run(); - - return 0; -@@ -532,8 +539,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; - const char *entropy_file = NULL; - -@@ -611,7 +617,7 @@ int main(int argc, char *argv[]) - goto out; - } - -- if (hostapd_global_run(&interfaces, daemonize, pid_file)) -+ if (hostapd_global_run(&interfaces)) - goto out; - - ret = 0; -@@ -622,7 +628,7 @@ int main(int argc, char *argv[]) - hostapd_interface_deinit_free(interfaces.iface[i]); - os_free(interfaces.iface); - -- hostapd_global_deinit(pid_file); -+ hostapd_global_deinit(); - os_free(pid_file); - - if (log_file) ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -1947,6 +1947,8 @@ static int hostapd_config_fill(struct ho - } - #endif /* CONFIG_IEEE80211W */ - #ifdef CONFIG_IEEE80211N -+ } else if (os_strcmp(buf, "noscan") == 0) { -+ conf->noscan = atoi(pos); - } else if (os_strcmp(buf, "ieee80211n") == 0) { - conf->ieee80211n = atoi(pos); - } else if (os_strcmp(buf, "ht_capab") == 0) { ---- a/src/ap/ap_config.h -+++ b/src/ap/ap_config.h -@@ -430,6 +430,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 -@@ -491,7 +491,7 @@ static int ieee80211n_check_40mhz(struct - { - struct wpa_driver_scan_params params; - -- if (!iface->conf->secondary_channel) -+ if (!iface->conf->secondary_channel || iface->conf->noscan) - return 0; /* HT40 not used */ - - wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabling " diff --git a/package/hostapd/patches/410-multicall.patch b/package/hostapd/patches/410-multicall.patch index b653769329..7900428aea 100644 --- a/package/hostapd/patches/410-multicall.patch +++ b/package/hostapd/patches/410-multicall.patch @@ -8,8 +8,8 @@ ifndef CONFIG_OS ifdef CONFIG_NATIVE_WINDOWS -@@ -168,10 +169,14 @@ ifdef CONFIG_IEEE80211N - CFLAGS += -DCONFIG_IEEE80211N +@@ -188,10 +189,14 @@ ifdef CONFIG_IEEE80211AC + CFLAGS += -DCONFIG_IEEE80211AC endif +ifndef MULTICALL @@ -26,7 +26,7 @@ LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -815,6 +820,12 @@ install: all +@@ -867,6 +872,12 @@ install: all BCHECK=../src/drivers/build.hostapd @@ -39,7 +39,7 @@ hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ -@@ -853,6 +864,12 @@ HOBJS += ../src/crypto/aes-internal.o +@@ -905,6 +916,12 @@ HOBJS += ../src/crypto/aes-internal.o HOBJS += ../src/crypto/aes-internal-enc.o endif @@ -62,7 +62,7 @@ BINALL=wpa_supplicant wpa_cli -@@ -673,6 +674,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -705,6 +706,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -73,7 +73,7 @@ endif ifdef CONFIG_AP -@@ -681,9 +686,11 @@ NEED_EAP_COMMON=y +@@ -713,9 +718,11 @@ NEED_EAP_COMMON=y NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_AP OBJS += ap.o @@ -85,9 +85,9 @@ OBJS += ../src/ap/hostapd.o OBJS += ../src/ap/wpa_auth_glue.o OBJS += ../src/ap/utils.o -@@ -731,10 +738,18 @@ endif - ifdef CONFIG_INTERWORKING - OBJS += ../src/ap/gas_serv.o +@@ -770,10 +777,18 @@ endif + ifdef CONFIG_HS20 + OBJS += ../src/ap/hs20.o endif +else + ifdef MULTICALL @@ -104,7 +104,7 @@ NEED_AES_WRAP=y OBJS += ../src/ap/wpa_auth.o OBJS += ../src/ap/wpa_auth_ie.o -@@ -1419,6 +1434,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -1515,6 +1530,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 " $@ -@@ -1485,6 +1506,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2. +@@ -1585,6 +1606,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 -@@ -3572,8 +3572,8 @@ union wpa_event_data { +@@ -3686,8 +3686,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 -@@ -467,8 +467,8 @@ static void hostapd_event_eapol_rx(struc +@@ -685,8 +685,8 @@ static void hostapd_event_eapol_rx(struc } @@ -179,7 +179,7 @@ for (;;) { --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -2046,8 +2046,8 @@ static void wnm_action_rx(struct wpa_sup +@@ -2258,8 +2258,8 @@ static void wnm_action_rx(struct wpa_sup } @@ -192,7 +192,7 @@ u16 reason_code = 0; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2704,6 +2704,9 @@ static void wpa_supplicant_deinit_iface( +@@ -2921,6 +2921,9 @@ static void wpa_supplicant_deinit_iface( } } @@ -202,7 +202,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -2895,6 +2898,7 @@ struct wpa_global * wpa_supplicant_init( +@@ -3113,6 +3116,7 @@ struct wpa_global * wpa_supplicant_init( wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ @@ -212,8 +212,8 @@ wpa_debug_open_syslog(); --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -533,6 +533,9 @@ static const char * hostapd_msg_ifname_c - return NULL; +@@ -530,6 +530,9 @@ static int hostapd_get_global_ctrl_iface + return 0; } +void hostapd_wpa_event(void *ctx, enum wpa_event_type event, @@ -222,13 +222,13 @@ int main(int argc, char *argv[]) { -@@ -546,6 +549,7 @@ int main(int argc, char *argv[]) - if (os_program_init()) - return -1; +@@ -555,6 +558,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:tv"); + c = getopt(argc, argv, "Bde:f:hKP:tvg:"); if (c < 0) --- a/src/drivers/drivers.c +++ b/src/drivers/drivers.c diff --git a/package/hostapd/patches/430-rescan_immediately.patch b/package/hostapd/patches/430-rescan_immediately.patch index 5332c9cea8..51d41f8001 100644 --- a/package/hostapd/patches/430-rescan_immediately.patch +++ b/package/hostapd/patches/430-rescan_immediately.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2215,7 +2215,7 @@ static struct wpa_supplicant * wpa_suppl +@@ -2388,7 +2388,7 @@ static struct wpa_supplicant * wpa_suppl if (wpa_s == NULL) return NULL; wpa_s->scan_req = 1; diff --git a/package/hostapd/patches/440-optional_rfkill.patch b/package/hostapd/patches/440-optional_rfkill.patch index e7b172944e..be18458b24 100644 --- a/package/hostapd/patches/440-optional_rfkill.patch +++ b/package/hostapd/patches/440-optional_rfkill.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -212,7 +212,9 @@ struct wpa_driver_nl80211_data { +@@ -218,7 +218,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; int has_capability; -@@ -2768,7 +2770,7 @@ static int wpa_driver_nl80211_init_nl(st +@@ -2828,7 +2830,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"); -@@ -2791,6 +2793,7 @@ static void wpa_driver_nl80211_rfkill_un +@@ -2851,6 +2853,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) -@@ -2922,7 +2925,9 @@ static void * wpa_driver_nl80211_init(vo +@@ -2979,7 +2982,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) -@@ -2956,6 +2961,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3013,6 +3018,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; -@@ -2968,6 +2974,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3025,6 +3031,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; -@@ -3254,10 +3261,12 @@ static void nl80211_mgmt_unsubscribe(str +@@ -3311,10 +3318,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, -@@ -3278,13 +3287,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s +@@ -3335,13 +3344,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; -@@ -3315,8 +3327,10 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3372,8 +3384,10 @@ wpa_driver_nl80211_finish_drv_init(struc return -1; if (send_rfkill_event) { @@ -95,7 +95,7 @@ } return 0; -@@ -3403,7 +3417,9 @@ static void wpa_driver_nl80211_deinit(vo +@@ -3460,7 +3474,9 @@ static void wpa_driver_nl80211_deinit(vo netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0, IF_OPER_UP); @@ -246,7 +246,7 @@ +DRV_WPA_CFLAGS += -DCONFIG_RFKILL endif - + ifdef CONFIG_VLAN_NETLINK --- a/src/drivers/driver_wext.h +++ b/src/drivers/driver_wext.h @@ -22,7 +22,9 @@ struct wpa_driver_wext_data { diff --git a/package/hostapd/patches/450-reload_freq_change.patch b/package/hostapd/patches/450-reload_freq_change.patch index 9245860d1e..f11593fcd5 100644 --- a/package/hostapd/patches/450-reload_freq_change.patch +++ b/package/hostapd/patches/450-reload_freq_change.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -137,6 +137,20 @@ int hostapd_reload_config(struct hostapd +@@ -140,6 +140,20 @@ int hostapd_reload_config(struct hostapd oldconf = hapd->iconf; iface->conf = newconf; diff --git a/package/hostapd/patches/451-nl80211_del_beacon_bss.patch b/package/hostapd/patches/451-nl80211_del_beacon_bss.patch index 9f0eae3bd4..801b78b124 100644 --- a/package/hostapd/patches/451-nl80211_del_beacon_bss.patch +++ b/package/hostapd/patches/451-nl80211_del_beacon_bss.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -3337,16 +3337,18 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -3394,16 +3394,18 @@ wpa_driver_nl80211_finish_drv_init(struc } @@ -21,7 +21,7 @@ return send_and_recv_msgs(drv, msg, NULL, NULL); nla_put_failure: -@@ -3354,6 +3356,21 @@ static int wpa_driver_nl80211_del_beacon +@@ -3411,6 +3413,21 @@ static int wpa_driver_nl80211_del_beacon return -ENOBUFS; } @@ -43,7 +43,7 @@ /** * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface -@@ -9099,4 +9116,5 @@ const struct wpa_driver_ops wpa_driver_n +@@ -9238,4 +9255,5 @@ const struct wpa_driver_ops wpa_driver_n .send_tdls_mgmt = nl80211_send_tdls_mgmt, .tdls_oper = nl80211_tdls_oper, #endif /* CONFIG_TDLS */ @@ -51,7 +51,7 @@ }; --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -2007,6 +2007,9 @@ struct wpa_driver_ops { +@@ -2053,6 +2053,9 @@ struct wpa_driver_ops { */ int (*probe_req_report)(void *priv, int report); diff --git a/package/hostapd/patches/452-ctrl_iface_reload.patch b/package/hostapd/patches/452-ctrl_iface_reload.patch index c0617eb75f..81dcfedde5 100644 --- a/package/hostapd/patches/452-ctrl_iface_reload.patch +++ b/package/hostapd/patches/452-ctrl_iface_reload.patch @@ -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,66 @@ static int hostapd_ctrl_iface_new_sta(st +@@ -152,6 +154,68 @@ static int hostapd_ctrl_iface_new_sta(st return 0; } @@ -69,28 +69,30 @@ + return conf; +} + -+static int hostapd_ctrl_iface_reload(struct hostapd_data *hapd, char *txt) ++static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt) +{ ++ struct hostapd_config * (*config_read_cb)(const char *config_fname); + struct hostapd_iface *iface = hapd->iface; + -+ iface->config_read_cb = hostapd_ctrl_iface_config_read; ++ config_read_cb = iface->interfaces->config_read_cb; ++ iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read; + reload_opts = txt; + + hostapd_reload_config(iface); + -+ iface->config_read_cb = hostapd_config_read; ++ iface->interfaces->config_read_cb = config_read_cb; +} #ifdef CONFIG_IEEE80211W #ifdef NEED_AP_MLME -@@ -710,6 +772,10 @@ static void hostapd_ctrl_iface_receive(i +@@ -864,6 +928,10 @@ static void hostapd_ctrl_iface_receive(i reply_len += res; } #endif /* CONFIG_NO_RADIUS */ + } else if (os_strcmp(buf, "DOWN") == 0) { + hostapd_ctrl_iface_set_down(hapd); -+ } else if (os_strncmp(buf, "RELOAD ", 7) == 0) { -+ hostapd_ctrl_iface_reload(hapd, buf + 7); ++ } else if (os_strncmp(buf, "UPDATE ", 7) == 0) { ++ hostapd_ctrl_iface_update(hapd, buf + 7); } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = hostapd_ctrl_iface_sta_first(hapd, reply, reply_size); diff --git a/package/hostapd/patches/453-ap_sta_support.patch b/package/hostapd/patches/453-ap_sta_support.patch index 795bead50a..4b6c0f1646 100644 --- a/package/hostapd/patches/453-ap_sta_support.patch +++ b/package/hostapd/patches/453-ap_sta_support.patch @@ -9,7 +9,7 @@ }; /** -@@ -271,6 +273,8 @@ struct wpa_supplicant { +@@ -294,6 +296,8 @@ struct wpa_supplicant { #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */ char bridge_ifname[16]; @@ -31,7 +31,7 @@ -include .config -include $(if $(MULTICALL),../hostapd/.config) -@@ -71,6 +75,10 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr +@@ -76,6 +80,10 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr OBJS_c += ../src/utils/wpa_debug.o OBJS_c += ../src/utils/common.o @@ -44,7 +44,7 @@ CONFIG_OS=win32 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -103,6 +103,55 @@ extern int wpa_debug_show_keys; +@@ -107,6 +107,55 @@ extern int wpa_debug_show_keys; extern int wpa_debug_timestamp; extern struct wpa_driver_ops *wpa_drivers[]; @@ -81,7 +81,7 @@ + channel = (bss->freq - 5000) / 5; + } + -+ if (asprintf(&cmd, "RELOAD channel=%d sec_chan=0 hw_mode=%d ieee80211n=%d", ++ if (asprintf(&cmd, "UPDATE channel=%d sec_chan=0 hw_mode=%d ieee80211n=%d", + channel, hw_mode, !!bss->ht_capab) < 0) { + return -1; + } @@ -100,10 +100,10 @@ /* Configure default/group WEP keys for static WEP */ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { -@@ -607,8 +656,16 @@ void wpa_supplicant_set_state(struct wpa - #ifdef CONFIG_P2P - wpas_p2p_completed(wpa_s); +@@ -672,8 +721,16 @@ void wpa_supplicant_set_state(struct wpa #endif /* CONFIG_P2P */ + + sme_sched_obss_scan(wpa_s, 1); +#ifdef MULTICALL + if (wpa_s->hostapd) + hostapd_reload(wpa_s, wpa_s->current_bss); @@ -117,7 +117,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -2522,6 +2579,21 @@ static int wpa_supplicant_init_iface(str +@@ -2727,6 +2784,21 @@ static int wpa_supplicant_init_iface(str os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname, sizeof(wpa_s->bridge_ifname)); } @@ -149,7 +149,7 @@ #include "drivers/driver.h" #include "wpa_supplicant_i.h" #include "config.h" -@@ -75,6 +76,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_ +@@ -139,6 +140,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_ static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src) { @@ -158,7 +158,7 @@ os_time_t usec; dst->flags = src->flags; -@@ -87,6 +90,12 @@ static void wpa_bss_copy_res(struct wpa_ +@@ -151,6 +154,12 @@ static void wpa_bss_copy_res(struct wpa_ dst->level = src->level; dst->tsf = src->tsf; @@ -173,9 +173,9 @@ usec = (src->age % 1000) * 1000; --- a/wpa_supplicant/bss.h +++ b/wpa_supplicant/bss.h -@@ -51,6 +51,7 @@ struct wpa_bss { - unsigned int flags; +@@ -72,6 +72,7 @@ struct wpa_bss { u8 bssid[ETH_ALEN]; + u8 hessid[ETH_ALEN]; u8 ssid[32]; + u16 ht_capab; size_t ssid_len; @@ -200,7 +200,7 @@ " -L = show license (BSD)\n" " -o = override driver parameter for new interfaces\n" " -O = override ctrl_interface parameter for new interfaces\n" -@@ -144,7 +145,7 @@ int main(int argc, char *argv[]) +@@ -155,7 +156,7 @@ int main(int argc, char *argv[]) for (;;) { c = getopt(argc, argv, @@ -209,7 +209,7 @@ if (c < 0) break; switch (c) { -@@ -188,6 +189,9 @@ int main(int argc, char *argv[]) +@@ -199,6 +200,9 @@ int main(int argc, char *argv[]) usage(); exitcode = 0; goto out; diff --git a/package/hostapd/patches/460-disable_ctrl_iface_mib.patch b/package/hostapd/patches/460-disable_ctrl_iface_mib.patch index b6b9182f5f..2f03179a0a 100644 --- a/package/hostapd/patches/460-disable_ctrl_iface_mib.patch +++ b/package/hostapd/patches/460-disable_ctrl_iface_mib.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -128,6 +128,9 @@ endif +@@ -135,6 +135,9 @@ endif ifdef CONFIG_NO_CTRL_IFACE CFLAGS += -DCONFIG_NO_CTRL_IFACE else @@ -12,7 +12,7 @@ endif --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -743,6 +743,7 @@ static void hostapd_ctrl_iface_receive(i +@@ -899,6 +899,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,20 +20,20 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = ieee802_11_get_mib(hapd, reply, reply_size); if (reply_len >= 0) { -@@ -772,10 +773,12 @@ static void hostapd_ctrl_iface_receive(i +@@ -928,10 +929,12 @@ static void hostapd_ctrl_iface_receive(i reply_len += res; } #endif /* CONFIG_NO_RADIUS */ +#endif } else if (os_strcmp(buf, "DOWN") == 0) { hostapd_ctrl_iface_set_down(hapd); - } else if (os_strncmp(buf, "RELOAD ", 7) == 0) { - hostapd_ctrl_iface_reload(hapd, buf + 7); + } else if (os_strncmp(buf, "UPDATE ", 7) == 0) { + hostapd_ctrl_iface_update(hapd, buf + 7); +#ifdef CONFIG_CTRL_IFACE_MIB } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = hostapd_ctrl_iface_sta_first(hapd, reply, reply_size); -@@ -785,6 +788,7 @@ static void hostapd_ctrl_iface_receive(i +@@ -941,6 +944,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 -@@ -719,6 +719,9 @@ ifdef CONFIG_IEEE80211N +@@ -751,6 +751,9 @@ ifdef CONFIG_IEEE80211N OBJS += ../src/ap/ieee802_11_ht.o endif ifdef CONFIG_CTRL_IFACE @@ -55,7 +55,7 @@ --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -3770,6 +3770,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -4382,6 +4382,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) { -@@ -3781,6 +3782,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -4393,6 +4394,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); -@@ -4135,6 +4137,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -4792,6 +4794,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) { -@@ -4143,6 +4146,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -4800,6 +4803,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 -@@ -1922,6 +1922,7 @@ static const char * bool_txt(Boolean boo +@@ -2034,6 +2034,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) { -@@ -2074,6 +2075,7 @@ int ieee802_1x_get_mib_sta(struct hostap +@@ -2186,6 +2187,7 @@ int ieee802_1x_get_mib_sta(struct hostap return len; } @@ -130,15 +130,15 @@ struct sta_info *sta, int success) --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -2638,6 +2638,7 @@ static int wpa_cipher_bits(int cipher) - } +@@ -2729,6 +2729,7 @@ static const char * wpa_bool_txt(int boo + return bool ? "TRUE" : "FALSE"; } +#ifdef CONFIG_CTRL_IFACE_MIB #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ -@@ -2801,7 +2802,7 @@ int wpa_get_mib_sta(struct wpa_state_mac +@@ -2873,7 +2874,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 -@@ -1918,6 +1918,8 @@ static u32 wpa_cipher_suite(struct wpa_s +@@ -1844,6 +1844,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 -@@ -1997,6 +1999,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -1927,6 +1929,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } diff --git a/package/hostapd/patches/470-wpa_ie_cap_workaround.patch b/package/hostapd/patches/470-wpa_ie_cap_workaround.patch index 1e6a44f3da..00a32229d4 100644 --- a/package/hostapd/patches/470-wpa_ie_cap_workaround.patch +++ b/package/hostapd/patches/470-wpa_ie_cap_workaround.patch @@ -1,6 +1,6 @@ --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c -@@ -953,6 +953,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) -@@ -960,8 +985,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/hostapd/patches/480-terminate_on_setup_failure.patch b/package/hostapd/patches/480-terminate_on_setup_failure.patch index 31ce3eb929..6168a5cfc3 100644 --- a/package/hostapd/patches/480-terminate_on_setup_failure.patch +++ b/package/hostapd/patches/480-terminate_on_setup_failure.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -778,11 +778,8 @@ int hostapd_setup_interface_complete(str +@@ -886,11 +886,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) { -@@ -798,7 +795,7 @@ int hostapd_setup_interface_complete(str +@@ -906,7 +903,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 @@ } } -@@ -809,7 +806,7 @@ int hostapd_setup_interface_complete(str +@@ -917,7 +914,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 @@ } } -@@ -817,14 +814,14 @@ int hostapd_setup_interface_complete(str +@@ -925,14 +922,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; -@@ -834,7 +831,7 @@ int hostapd_setup_interface_complete(str +@@ -942,7 +939,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; } -@@ -846,7 +843,7 @@ int hostapd_setup_interface_complete(str +@@ -954,7 +951,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,8 +67,8 @@ } /* -@@ -870,6 +867,11 @@ int hostapd_setup_interface_complete(str - iface->init_complete(iface); +@@ -975,6 +972,11 @@ int hostapd_setup_interface_complete(str + iface->bss[0]->conf->iface); return 0; + diff --git a/package/hostapd/patches/500-random_pool_add_kernel.patch b/package/hostapd/patches/500-random_pool_add_kernel.patch index 5ef8f47ad1..e54e881d8e 100644 --- a/package/hostapd/patches/500-random_pool_add_kernel.patch +++ b/package/hostapd/patches/500-random_pool_add_kernel.patch @@ -1,6 +1,6 @@ --- a/src/crypto/random.c +++ b/src/crypto/random.c -@@ -32,6 +32,8 @@ +@@ -33,6 +33,8 @@ #include "sha1.h" #include "random.h" @@ -9,7 +9,7 @@ #define POOL_WORDS 32 #define POOL_WORDS_MASK (POOL_WORDS - 1) #define POOL_TAP1 26 -@@ -42,6 +44,8 @@ +@@ -43,6 +45,8 @@ #define EXTRACT_LEN 16 #define MIN_READY_MARK 2 @@ -18,7 +18,7 @@ static u32 pool[POOL_WORDS]; static unsigned int input_rotate = 0; static unsigned int pool_pos = 0; -@@ -122,7 +126,7 @@ static void random_extract(u8 *out) +@@ -123,7 +127,7 @@ static void random_extract(u8 *out) } @@ -27,7 +27,7 @@ { struct os_time t; static unsigned int count = 0; -@@ -191,16 +195,22 @@ int random_get_bytes(void *buf, size_t l +@@ -213,16 +217,22 @@ int random_get_bytes(void *buf, size_t l int random_pool_ready(void) { #ifdef __linux__ @@ -51,7 +51,7 @@ /* * Try to fetch some more data from the kernel high quality -@@ -235,6 +245,7 @@ int random_pool_ready(void) +@@ -257,6 +267,7 @@ int random_pool_ready(void) if (dummy_key_avail == sizeof(dummy_key)) { if (own_pool_ready < MIN_READY_MARK) own_pool_ready = MIN_READY_MARK; @@ -59,7 +59,7 @@ random_write_entropy(); return 1; } -@@ -247,6 +258,7 @@ int random_pool_ready(void) +@@ -269,6 +280,7 @@ int random_pool_ready(void) total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) { wpa_printf(MSG_INFO, "random: Allow operation to proceed " "based on internal entropy"); @@ -67,7 +67,7 @@ return 1; } -@@ -262,10 +274,16 @@ int random_pool_ready(void) +@@ -284,10 +296,16 @@ int random_pool_ready(void) void random_mark_pool_ready(void) { @@ -84,7 +84,7 @@ } -@@ -422,3 +440,22 @@ void random_deinit(void) +@@ -444,3 +462,22 @@ void random_deinit(void) os_free(random_entropy_file); random_entropy_file = NULL; } @@ -109,7 +109,7 @@ +} --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1161,9 +1161,8 @@ endif +@@ -1217,9 +1217,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -122,7 +122,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk -@@ -1139,9 +1139,8 @@ endif +@@ -1161,9 +1161,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -135,7 +135,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/hostapd/Android.mk +++ b/hostapd/Android.mk -@@ -724,11 +724,11 @@ endif +@@ -748,11 +748,11 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL else @@ -151,7 +151,7 @@ L_CFLAGS += -DRADIUS_SERVER --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -719,12 +719,12 @@ endif +@@ -755,12 +755,12 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL else diff --git a/package/hostapd/patches/510-bring_down_interface.patch b/package/hostapd/patches/510-bring_down_interface.patch index da21313148..7481eb152a 100644 --- a/package/hostapd/patches/510-bring_down_interface.patch +++ b/package/hostapd/patches/510-bring_down_interface.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7026,8 +7026,6 @@ static int wpa_driver_nl80211_set_mode(s +@@ -7144,8 +7144,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) -@@ -7043,6 +7041,7 @@ static int wpa_driver_nl80211_set_mode(s +@@ -7161,6 +7159,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/hostapd/patches/520-fix_wps_pin_crash.patch b/package/hostapd/patches/520-fix_wps_pin_crash.patch index df1e3d0314..29d154cef3 100644 --- a/package/hostapd/patches/520-fix_wps_pin_crash.patch +++ b/package/hostapd/patches/520-fix_wps_pin_crash.patch @@ -1,6 +1,6 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -343,6 +343,9 @@ static int hostapd_ctrl_iface_wps_ap_pin +@@ -450,6 +450,9 @@ static int hostapd_ctrl_iface_wps_ap_pin char *pos; const char *pin_txt; diff --git a/package/hostapd/patches/530-wps_single_auth_enc_type.patch b/package/hostapd/patches/530-wps_single_auth_enc_type.patch index c6477a3548..f05ea35cf9 100644 --- a/package/hostapd/patches/530-wps_single_auth_enc_type.patch +++ b/package/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 -@@ -856,11 +856,9 @@ int hostapd_init_wps(struct hostapd_data +@@ -873,11 +873,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) -@@ -868,7 +866,7 @@ int hostapd_init_wps(struct hostapd_data +@@ -885,7 +883,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/hostapd/patches/540-dynamic_20_40_mhz.patch b/package/hostapd/patches/540-dynamic_20_40_mhz.patch index 420fcc6bf6..d58358c083 100644 --- a/package/hostapd/patches/540-dynamic_20_40_mhz.patch +++ b/package/hostapd/patches/540-dynamic_20_40_mhz.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -1957,6 +1957,10 @@ static int hostapd_config_fill(struct ho +@@ -2495,6 +2495,10 @@ static int hostapd_config_fill(struct ho "ht_capab", line); errors++; } @@ -13,17 +13,17 @@ #endif /* CONFIG_IEEE80211N */ --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -434,6 +434,7 @@ struct hostapd_config { +@@ -501,6 +501,7 @@ struct hostapd_config { int ieee80211n; int secondary_channel; int require_ht; + int dynamic_ht40; - }; - - + u32 vht_capab; + int ieee80211ac; + int require_vht; --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -21,6 +21,7 @@ +@@ -22,6 +22,7 @@ #include "beacon.h" #include "iapp.h" #include "ieee802_1x.h" @@ -31,7 +31,7 @@ #include "ieee802_11_auth.h" #include "vlan_init.h" #include "wpa_auth.h" -@@ -317,6 +318,7 @@ static void hostapd_cleanup_iface_pre(st +@@ -323,6 +324,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 -@@ -238,6 +238,9 @@ struct hostapd_iface { +@@ -251,6 +251,9 @@ struct hostapd_iface { /* Overlapping BSS information */ int olbc_ht; @@ -50,10 +50,10 @@ + u16 ht_op_mode; void (*scan_cb)(struct hostapd_iface *iface); - + }; --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -1205,6 +1205,9 @@ static void handle_beacon(struct hostapd +@@ -1220,6 +1220,9 @@ static void handle_beacon(struct hostapd sizeof(mgmt->u.beacon)), &elems, 0); @@ -65,9 +65,9 @@ --- a/src/ap/ieee802_11.h +++ b/src/ap/ieee802_11.h -@@ -73,4 +73,17 @@ u8 * hostapd_eid_time_zone(struct hostap - int hostapd_update_time_adv(struct hostapd_data *hapd); +@@ -78,4 +78,17 @@ int hostapd_update_time_adv(struct hosta void hostapd_client_poll_ok(struct hostapd_data *hapd, const u8 *addr); + u8 * hostapd_eid_bss_max_idle_period(struct hostapd_data *hapd, u8 *eid); +#ifdef CONFIG_IEEE80211N +void hostapd_trigger_20mhz(struct hostapd_iface *iface); diff --git a/package/hostapd/patches/560-indicate-features.patch b/package/hostapd/patches/560-indicate-features.patch index 257928c746..d01e18b862 100644 --- a/package/hostapd/patches/560-indicate-features.patch +++ b/package/hostapd/patches/560-indicate-features.patch @@ -8,16 +8,16 @@ #include "crypto/random.h" #include "crypto/tls.h" #include "common/version.h" -@@ -551,7 +552,7 @@ int main(int argc, char *argv[]) +@@ -560,7 +561,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; for (;;) { -- c = getopt(argc, argv, "Bde:f:hKP:tv"); -+ c = getopt(argc, argv, "Bde:f:hKP:tv::"); +- c = getopt(argc, argv, "Bde:f:hKP:tvg:"); ++ c = getopt(argc, argv, "Bde:f:hKP:tg:v::"); if (c < 0) break; switch (c) { -@@ -583,6 +584,8 @@ int main(int argc, char *argv[]) +@@ -592,6 +593,8 @@ int main(int argc, char *argv[]) wpa_debug_timestamp++; break; case 'v': @@ -36,7 +36,7 @@ #include "wpa_supplicant_i.h" #include "driver_i.h" -@@ -145,7 +146,7 @@ int main(int argc, char *argv[]) +@@ -156,7 +157,7 @@ int main(int argc, char *argv[]) for (;;) { c = getopt(argc, argv, @@ -45,7 +45,7 @@ if (c < 0) break; switch (c) { -@@ -237,8 +238,12 @@ int main(int argc, char *argv[]) +@@ -248,8 +249,12 @@ int main(int argc, char *argv[]) break; #endif /* CONFIG_DBUS */ case 'v': diff --git a/package/hostapd/patches/570-genl_connect_debug.patch b/package/hostapd/patches/570-genl_connect_debug.patch index 5475cbe9eb..5f140489b0 100644 --- a/package/hostapd/patches/570-genl_connect_debug.patch +++ b/package/hostapd/patches/570-genl_connect_debug.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -121,7 +121,7 @@ static struct nl_handle * nl_create_hand +@@ -127,7 +127,7 @@ static struct nl_handle * nl_create_hand } if (genl_connect(handle)) { diff --git a/package/hostapd/patches/580-fix_bss_addr.patch b/package/hostapd/patches/580-fix_bss_addr.patch index fffa25ec42..3a76668c14 100644 --- a/package/hostapd/patches/580-fix_bss_addr.patch +++ b/package/hostapd/patches/580-fix_bss_addr.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7607,7 +7607,7 @@ static int i802_set_wds_sta(void *priv, +@@ -7738,7 +7738,7 @@ static int i802_set_wds_sta(void *priv, if (!if_nametoindex(name)) { if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN, diff --git a/package/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 447f480d1f..ac0d247d76 100644 --- a/package/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli #include "common/defs.h" #define HOSTAPD_CHAN_DISABLED 0x00000001 -@@ -332,6 +333,11 @@ struct wpa_driver_associate_params { +@@ -351,6 +352,11 @@ struct wpa_driver_associate_params { */ int freq; @@ -44,7 +44,7 @@ Signed-hostap: Antonio Quartulli #include "config.h" -@@ -1431,6 +1432,97 @@ static char * wpa_config_write_p2p_clien +@@ -1463,6 +1464,97 @@ static char * wpa_config_write_p2p_clien #endif /* CONFIG_P2P */ @@ -142,10 +142,10 @@ Signed-hostap: Antonio Quartulli /* Helper macros for network block parser */ #ifdef OFFSET -@@ -1605,6 +1697,10 @@ static const struct parse_data ssid_fiel - { STR(ht_mcs) }, +@@ -1638,6 +1730,10 @@ static const struct parse_data ssid_fiel #endif /* CONFIG_HT_OVERRIDES */ { INT(ap_max_inactivity) }, + { INT(dtim_period) }, + { INT_RANGE(fixed_freq, 0, 1) }, + { INT_RANGE(beacon_interval, 0, 1000) }, + { FUNC(rates) }, @@ -163,10 +163,10 @@ Signed-hostap: Antonio Quartulli #define MAX_SSID_LEN 32 -@@ -499,6 +500,11 @@ struct wpa_ssid { - * By default: 300 seconds. +@@ -529,6 +530,11 @@ struct wpa_ssid { + * disabled_until - Network block disabled until this time if non-zero */ - int ap_max_inactivity; + struct os_time disabled_until; + + int fixed_freq; + int beacon_interval; @@ -177,7 +177,7 @@ Signed-hostap: Antonio Quartulli #endif /* CONFIG_SSID_H */ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1395,15 +1395,24 @@ void wpa_supplicant_associate(struct wpa +@@ -1561,15 +1561,24 @@ void wpa_supplicant_associate(struct wpa params.ssid_len = ssid->ssid_len; } diff --git a/package/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch index 28eba21d95..c426a0bb2d 100644 --- a/package/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch +++ b/package/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 -@@ -6481,7 +6481,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -6587,7 +6587,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); -@@ -6514,6 +6514,37 @@ retry: +@@ -6620,6 +6620,37 @@ retry: wpa_printf(MSG_DEBUG, " * freq=%d", params->freq); NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq); diff --git a/package/hostapd/patches/604-wpa_s-support-htmode-param.patch b/package/hostapd/patches/604-wpa_s-support-htmode-param.patch index e540d45334..44931f2f3b 100644 --- a/package/hostapd/patches/604-wpa_s-support-htmode-param.patch +++ b/package/hostapd/patches/604-wpa_s-support-htmode-param.patch @@ -16,7 +16,7 @@ Signed-off-by: Antonio Quartulli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -337,6 +337,8 @@ struct wpa_driver_associate_params { +@@ -356,6 +356,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 * bg_scan_period - Background scan period in seconds, 0 to disable --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -6545,6 +6545,22 @@ retry: +@@ -6651,6 +6651,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 -@@ -1463,6 +1463,71 @@ static char * wpa_config_write_mcast_rat +@@ -1495,6 +1495,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) -@@ -1701,6 +1766,7 @@ static const struct parse_data ssid_fiel +@@ -1734,6 +1799,7 @@ static const struct parse_data ssid_fiel { INT_RANGE(beacon_interval, 0, 1000) }, { 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 -@@ -505,6 +505,8 @@ struct wpa_ssid { +@@ -535,6 +535,8 @@ struct wpa_ssid { int beacon_interval; 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 -@@ -1411,6 +1411,8 @@ void wpa_supplicant_associate(struct wpa +@@ -1577,6 +1577,8 @@ void wpa_supplicant_associate(struct wpa i++; } params.mcast_rate = ssid->mcast_rate;