hostapd: merge fixes for WPA packet number reuse with replayed messages and key reins...
[openwrt/staging/jow.git] / package / network / services / hostapd / patches / 370-ap_sta_support.patch
index 716916a0f0ed2021d65cd9e50cd09098e472b673..a37b193b6ba76324f8a0798aa3ada938745ccef4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant_i.h
 +++ b/wpa_supplicant/wpa_supplicant_i.h
-@@ -99,6 +99,11 @@ struct wpa_interface {
+@@ -101,6 +101,11 @@ struct wpa_interface {
        const char *ifname;
  
        /**
@@ -12,8 +12,8 @@
         * bridge_ifname - Optional bridge interface name
         *
         * If the driver interface (ifname) is included in a Linux bridge
-@@ -465,6 +470,8 @@ struct wpa_supplicant {
- #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
+@@ -512,6 +517,8 @@ struct wpa_supplicant {
+ #endif /* CONFIG_CTRL_IFACE_BINDER */
        char bridge_ifname[16];
  
 +      struct wpa_ctrl *hostapd;
@@ -34,8 +34,8 @@
  -include .config
  -include $(if $(MULTICALL),../hostapd/.config)
  
-@@ -113,6 +117,8 @@ OBJS_c += ../src/utils/wpa_debug.o
- OBJS_c += ../src/utils/common.o
+@@ -117,6 +121,8 @@ OBJS_c += ../src/utils/common.o
+ OBJS_c += ../src/common/cli.o
  OBJS += wmm_ac.o
  
 +OBJS += ../src/common/wpa_ctrl.o
@@ -45,9 +45,9 @@
  CONFIG_OS=win32
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -108,6 +108,55 @@ const char *const wpa_supplicant_full_li
"\n";
- #endif /* CONFIG_NO_STDOUT_DEBUG */
+@@ -118,6 +118,55 @@ const char *const wpa_supplicant_full_li
static void wpa_bss_tmp_disallow_timeout(void *eloop_ctx, void *timeout_ctx);
  
 +static int hostapd_stop(struct wpa_supplicant *wpa_s)
 +{
  /* Configure default/group WEP keys for static WEP */
  int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
  {
-@@ -783,8 +832,12 @@ void wpa_supplicant_set_state(struct wpa
+@@ -883,8 +932,12 @@ void wpa_supplicant_set_state(struct wpa
                wpas_p2p_completed(wpa_s);
  
                sme_sched_obss_scan(wpa_s, 1);
                wpa_s->new_connection = 1;
                wpa_drv_set_operstate(wpa_s, 0);
  #ifndef IEEE8021X_EAPOL
-@@ -4537,6 +4590,20 @@ static int wpa_supplicant_init_iface(str
+@@ -5080,6 +5133,20 @@ static int wpa_supplicant_init_iface(str
                           sizeof(wpa_s->bridge_ifname));
        }
  
        /* RSNA Supplicant Key Management - INITIALIZE */
        eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
        eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
-@@ -4823,6 +4890,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -5404,6 +5471,11 @@ static void wpa_supplicant_deinit_iface(
        if (terminate)
                wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
  
  #include "common/ieee802_11_defs.h"
 +#include "common/ieee802_11_common.h"
  #include "drivers/driver.h"
+ #include "eap_peer/eap.h"
  #include "wpa_supplicant_i.h"
- #include "config.h"
-@@ -287,6 +288,10 @@ static void calculate_update_time(const
+@@ -290,6 +291,10 @@ void calculate_update_time(const struct
  static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
                             struct os_reltime *fetch_time)
  {
        dst->flags = src->flags;
        os_memcpy(dst->bssid, src->bssid, ETH_ALEN);
        dst->freq = src->freq;
-@@ -299,6 +304,15 @@ static void wpa_bss_copy_res(struct wpa_
+@@ -302,6 +307,15 @@ static void wpa_bss_copy_res(struct wpa_
        dst->est_throughput = src->est_throughput;
        dst->snr = src->snr;
  
               "  -g = global ctrl_interface\n"
               "  -G = global ctrl_interface group\n"
               "  -h = show this help text\n"
-+                 "  -H = connect to a hostapd instance to manage state changes\n"
++             "  -H = connect to a hostapd instance to manage state changes\n"
               "  -i = interface name\n"
               "  -I = additional configuration file\n"
               "  -K = include keys (passwords, etc.) in debug output\n"
-@@ -176,7 +177,7 @@ int main(int argc, char *argv[])
+@@ -201,7 +202,7 @@ int main(int argc, char *argv[])
  
        for (;;) {
                c = getopt(argc, argv,
--                         "b:Bc:C:D:de:f:g:G:hi:I:KLm:No:O:p:P:qsTtuvW");
-+                         "b:Bc:C:D:de:f:g:G:hH:i:I:KLm:No:O:p:P:qsTtuvW");
+-                         "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");
++                         "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuvW");
                if (c < 0)
                        break;
                switch (c) {
-@@ -223,6 +224,9 @@ int main(int argc, char *argv[])
+@@ -248,6 +249,9 @@ int main(int argc, char *argv[])
                        usage();
                        exitcode = 0;
                        goto out;
                        break;
 --- a/wpa_supplicant/bss.h
 +++ b/wpa_supplicant/bss.h
-@@ -79,6 +79,10 @@ struct wpa_bss {
+@@ -80,6 +80,10 @@ struct wpa_bss {
        u8 ssid[SSID_MAX_LEN];
        /** Length of SSID */
        size_t ssid_len;
-+      /** HT caapbilities */
++      /** HT capabilities */
 +      u16 ht_capab;
 +      /* Five octets of HT Operation Information */
 +      u8 ht_param;