| package/hostapd/patches/500-scan_wait.patch |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | struct hapd_interfaces { |
| 34 | | @@ -163,6 +165,15 @@ static void hostapd_logger_cb(void *ctx, |
| 34 | @@ -163,6 +165,16 @@ static void hostapd_logger_cb(void *ctx, |
| 35 | 35 | } |
| 36 | 36 | #endif /* CONFIG_NO_HOSTAPD_LOGGER */ |
| 37 | 37 | |
| ... | ... | |
| 42 | 42 | + return -1; |
| 43 | 43 | + } |
| 44 | 44 | + daemonize = 0; |
| 45 | + return 0; |
| 45 | 46 | +} |
| 46 | 47 | + |
| 47 | 48 | |
| 48 | 49 | /** |
| 49 | 50 | * hostapd_init - Allocate and initialize per-interface data |
| 50 | | @@ -184,6 +195,7 @@ static struct hostapd_iface * hostapd_in |
| 51 | @@ -184,6 +196,7 @@ static struct hostapd_iface * hostapd_in |
| 51 | 52 | if (hapd_iface == NULL) |
| 52 | 53 | goto fail; |
| 53 | 54 | |
| ... | ... | |
| 55 | 56 | hapd_iface->reload_config = hostapd_reload_config; |
| 56 | 57 | hapd_iface->config_read_cb = hostapd_config_read; |
| 57 | 58 | hapd_iface->config_fname = os_strdup(config_file); |
| 58 | | @@ -399,7 +411,7 @@ static int hostapd_global_init(struct ha |
| 59 | @@ -399,7 +412,7 @@ static int hostapd_global_init(struct ha |
| 59 | 60 | } |
| 60 | 61 | |
| 61 | 62 | |
| ... | ... | |
| 64 | 65 | { |
| 65 | 66 | #ifdef EAP_SERVER_TNC |
| 66 | 67 | tncs_global_deinit(); |
| 67 | | @@ -419,8 +431,7 @@ static void hostapd_global_deinit(const |
| 68 | @@ -419,8 +432,7 @@ static void hostapd_global_deinit(const |
| 68 | 69 | } |
| 69 | 70 | |
| 70 | 71 | |
| ... | ... | |
| 74 | 75 | { |
| 75 | 76 | #ifdef EAP_SERVER_TNC |
| 76 | 77 | int tnc = 0; |
| 77 | | @@ -441,11 +452,6 @@ static int hostapd_global_run(struct hap |
| 78 | @@ -441,11 +453,6 @@ static int hostapd_global_run(struct hap |
| 78 | 79 | } |
| 79 | 80 | #endif /* EAP_SERVER_TNC */ |
| 80 | 81 | |
| ... | ... | |
| 86 | 87 | eloop_run(); |
| 87 | 88 | |
| 88 | 89 | return 0; |
| 89 | | @@ -501,8 +507,7 @@ int main(int argc, char *argv[]) |
| 90 | @@ -501,8 +508,7 @@ int main(int argc, char *argv[]) |
| 90 | 91 | struct hapd_interfaces interfaces; |
| 91 | 92 | int ret = 1; |
| 92 | 93 | size_t i; |
| ... | ... | |
| 96 | 97 | const char *log_file = NULL; |
| 97 | 98 | |
| 98 | 99 | if (os_program_init()) |
| 99 | | @@ -576,7 +581,7 @@ int main(int argc, char *argv[]) |
| 100 | @@ -576,7 +582,7 @@ int main(int argc, char *argv[]) |
| 100 | 101 | goto out; |
| 101 | 102 | } |
| 102 | 103 | |
| ... | ... | |
| 105 | 106 | goto out; |
| 106 | 107 | |
| 107 | 108 | ret = 0; |
| 108 | | @@ -587,7 +592,7 @@ int main(int argc, char *argv[]) |
| 109 | @@ -587,7 +593,7 @@ int main(int argc, char *argv[]) |
| 109 | 110 | hostapd_interface_deinit_free(interfaces.iface[i]); |
| 110 | 111 | os_free(interfaces.iface); |
| 111 | 112 | |
| package/hostapd/patches/510-multicall.patch |
| 212 | 212 | wpa_debug_open_syslog(); |
| 213 | 213 | --- a/hostapd/main.c |
| 214 | 214 | +++ b/hostapd/main.c |
| 215 | | @@ -501,6 +501,9 @@ static const char * hostapd_msg_ifname_c |
| 215 | @@ -502,6 +502,9 @@ static const char * hostapd_msg_ifname_c |
| 216 | 216 | return NULL; |
| 217 | 217 | } |
| 218 | 218 | |
| ... | ... | |
| 222 | 222 | |
| 223 | 223 | int main(int argc, char *argv[]) |
| 224 | 224 | { |
| 225 | | @@ -513,6 +516,7 @@ int main(int argc, char *argv[]) |
| 225 | @@ -514,6 +517,7 @@ int main(int argc, char *argv[]) |
| 226 | 226 | if (os_program_init()) |
| 227 | 227 | return -1; |
| 228 | 228 | |
| package/hostapd/patches/551-nl80211_del_beacon_bss.patch |
| 1 | 1 | --- a/src/drivers/driver_nl80211.c |
| 2 | 2 | +++ b/src/drivers/driver_nl80211.c |
| 3 | | @@ -2092,23 +2092,41 @@ wpa_driver_nl80211_finish_drv_init(struc |
| 3 | @@ -2092,23 +2092,43 @@ wpa_driver_nl80211_finish_drv_init(struc |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | |
| ... | ... | |
| 33 | 33 | + |
| 34 | 34 | + for (bss = &drv->first_bss; bss; bss = bss->next) |
| 35 | 35 | + wpa_driver_nl80211_del_bss_beacon(bss); |
| 36 | + |
| 37 | + return 0; |
| 36 | 38 | +} |
| 37 | 39 | + |
| 38 | 40 | +static int wpa_driver_nl80211_stop_ap(void *priv) |
| 39 | 41 | +{ |
| 40 | 42 | + struct i802_bss *bss = priv; |
| 41 | 43 | + |
| 42 | | + wpa_driver_nl80211_del_beacon(bss->drv); |
| 44 | + return wpa_driver_nl80211_del_beacon(bss->drv); |
| 43 | 45 | +} |
| 44 | 46 | |
| 45 | 47 | /** |
| 46 | 48 | * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface |
| 47 | | @@ -6581,4 +6599,5 @@ const struct wpa_driver_ops wpa_driver_n |
| 49 | @@ -6581,4 +6601,5 @@ const struct wpa_driver_ops wpa_driver_n |
| 48 | 50 | .set_intra_bss = nl80211_set_intra_bss, |
| 49 | 51 | .set_param = nl80211_set_param, |
| 50 | 52 | .get_radio_name = nl80211_get_radio_name, |
| package/hostapd/patches/710-bring_down_interface.patch |
| 1 | 1 | --- a/src/drivers/driver_nl80211.c |
| 2 | 2 | +++ b/src/drivers/driver_nl80211.c |
| 3 | | @@ -4919,9 +4919,6 @@ static int wpa_driver_nl80211_set_mode(v |
| 3 | @@ -4921,9 +4921,6 @@ static int wpa_driver_nl80211_set_mode(v |
| 4 | 4 | /* Try to set the mode again while the interface is |
| 5 | 5 | * down */ |
| 6 | 6 | ret = nl80211_set_mode(drv, drv->ifindex, nlmode); |
| ... | ... | |
| 10 | 10 | if (!ret) |
| 11 | 11 | break; |
| 12 | 12 | } else |
| 13 | | @@ -4934,6 +4931,8 @@ static int wpa_driver_nl80211_set_mode(v |
| 13 | @@ -4936,6 +4933,8 @@ static int wpa_driver_nl80211_set_mode(v |
| 14 | 14 | wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while " |
| 15 | 15 | "interface is down"); |
| 16 | 16 | drv->nlmode = nlmode; |
| package/hostapd/patches/730-fix_wds_bridge_handling.patch |
| 1 | 1 | --- a/src/drivers/driver_nl80211.c |
| 2 | 2 | +++ b/src/drivers/driver_nl80211.c |
| 3 | | @@ -5502,6 +5502,9 @@ static int i802_set_wds_sta(void *priv, |
| 3 | @@ -5504,6 +5504,9 @@ static int i802_set_wds_sta(void *priv, |
| 4 | 4 | linux_set_iface_flags(drv->ioctl_sock, name, 1); |
| 5 | 5 | return i802_set_sta_vlan(priv, addr, name, 0); |
| 6 | 6 | } else { |
| ... | ... | |
| 10 | 10 | i802_set_sta_vlan(priv, addr, bss->ifname, 0); |
| 11 | 11 | return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN, |
| 12 | 12 | name); |
| 13 | | @@ -5942,14 +5945,14 @@ static int wpa_driver_nl80211_if_remove( |
| 13 | @@ -5944,14 +5947,14 @@ static int wpa_driver_nl80211_if_remove( |
| 14 | 14 | return -1; |
| 15 | 15 | |
| 16 | 16 | #ifdef HOSTAPD |
| package/hostapd/patches/800-dynamic_20_40_mhz.patch |
| 23 | 23 | |
| 24 | 24 | --- a/src/ap/hostapd.c |
| 25 | 25 | +++ b/src/ap/hostapd.c |
| 26 | | @@ -285,6 +285,7 @@ static void hostapd_cleanup_iface_pre(st |
| 26 | @@ -27,6 +27,7 @@ |
| 27 | #include "beacon.h" |
| 28 | #include "iapp.h" |
| 29 | #include "ieee802_1x.h" |
| 30 | +#include "ieee802_11.h" |
| 31 | #include "ieee802_11_auth.h" |
| 32 | #include "vlan_init.h" |
| 33 | #include "wpa_auth.h" |
| 34 | @@ -285,6 +286,7 @@ static void hostapd_cleanup_iface_pre(st |
| 27 | 35 | */ |
| 28 | 36 | static void hostapd_cleanup_iface(struct hostapd_iface *iface) |
| 29 | 37 | { |
| ... | ... | |
| 77 | 85 | #endif /* IEEE802_11_H */ |
| 78 | 86 | --- a/src/ap/ieee802_11_ht.c |
| 79 | 87 | +++ b/src/ap/ieee802_11_ht.c |
| 80 | | @@ -70,12 +70,15 @@ u8 * hostapd_eid_ht_operation(struct hos |
| 88 | @@ -20,9 +20,11 @@ |
| 89 | #include "drivers/driver.h" |
| 90 | #include "hostapd.h" |
| 91 | #include "ap_config.h" |
| 92 | +#include "ap_drv_ops.h" |
| 93 | #include "sta_info.h" |
| 94 | #include "beacon.h" |
| 95 | #include "ieee802_11.h" |
| 96 | +#include "utils/eloop.h" |
| 97 | |
| 98 | |
| 99 | u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid) |
| 100 | @@ -70,12 +72,15 @@ u8 * hostapd_eid_ht_operation(struct hos |
| 81 | 101 | |
| 82 | 102 | oper->control_chan = hapd->iconf->channel; |
| 83 | 103 | oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode); |
| ... | ... | |
| 99 | 119 | |
| 100 | 120 | pos += sizeof(*oper); |
| 101 | 121 | |
| 102 | | @@ -265,3 +268,80 @@ void hostapd_get_ht_capab(struct hostapd |
| 122 | @@ -265,3 +270,80 @@ void hostapd_get_ht_capab(struct hostapd |
| 103 | 123 | |
| 104 | 124 | neg_ht_cap->ht_capabilities_info = host_to_le16(cap); |
| 105 | 125 | } |
| 106 | 126 | + |
| 107 | | +static int hostapd_set_force_20mhz(struct hostapd_iface *iface); |
| 127 | +static void hostapd_set_force_20mhz(struct hostapd_iface *iface); |
| 108 | 128 | + |
| 109 | | +static int hostapd_restore_40mhz(void *eloop_data, void *user_ctx) |
| 129 | +static void hostapd_restore_40mhz(void *eloop_data, void *user_ctx) |
| 110 | 130 | +{ |
| 111 | 131 | + struct hostapd_iface *iface = eloop_data; |
| 112 | 132 | + struct os_time time; |
| ... | ... | |
| 132 | 152 | + hostapd_set_force_20mhz(iface); |
| 133 | 153 | +} |
| 134 | 154 | + |
| 135 | | +static int hostapd_set_force_20mhz(struct hostapd_iface *iface) |
| 155 | +static void hostapd_set_force_20mhz(struct hostapd_iface *iface) |
| 136 | 156 | +{ |
| 137 | 157 | + int secondary_channel; |
| 138 | 158 | + int i; |