hostapd: Update to version 2.9 (2019-08-08)
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 370-ap_sta_support.patch
index ecb9460e95965880f1a0ab5ab5c5345954c9ebd0..5916619fa503fcaaf6860f365f2def53a48425ef 100644 (file)
@@ -11,7 +11,7 @@
  -include .config
  -include $(if $(MULTICALL),../hostapd/.config)
  
-@@ -117,6 +121,8 @@ OBJS_c += ../src/utils/common.o
+@@ -116,6 +120,8 @@ OBJS_c += ../src/utils/common.o
  OBJS_c += ../src/common/cli.o
  OBJS += wmm_ac.o
  
                        break;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -125,6 +125,55 @@ static void wpas_update_fils_connect_par
+@@ -127,6 +127,55 @@ static void wpas_update_fils_connect_par
  #endif /* CONFIG_FILS && IEEE8021X_EAPOL */
  
  
  /* Configure default/group WEP keys for static WEP */
  int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
  {
-@@ -920,12 +969,16 @@ void wpa_supplicant_set_state(struct wpa
+@@ -941,12 +990,16 @@ void wpa_supplicant_set_state(struct wpa
  
                sme_sched_obss_scan(wpa_s, 1);
  
                wpa_s->new_connection = 1;
                wpa_drv_set_operstate(wpa_s, 0);
  #ifndef IEEE8021X_EAPOL
-@@ -1977,6 +2030,8 @@ void wpa_supplicant_associate(struct wpa
+@@ -2039,6 +2092,8 @@ void wpa_supplicant_associate(struct wpa
                        wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
                        ssid->id);
                wpas_notify_mesh_group_started(wpa_s, ssid);
  #else /* CONFIG_MESH */
                wpa_msg(wpa_s, MSG_ERROR,
                        "mesh mode support not included in the build");
-@@ -5487,6 +5542,16 @@ static int wpa_supplicant_init_iface(str
+@@ -5717,6 +5772,16 @@ 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);
-@@ -5808,6 +5873,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -6044,6 +6109,11 @@ static void wpa_supplicant_deinit_iface(
        if (terminate)
                wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
  
         * bridge_ifname - Optional bridge interface name
         *
         * If the driver interface (ifname) is included in a Linux bridge
-@@ -513,6 +518,8 @@ struct wpa_supplicant {
+@@ -516,6 +521,8 @@ struct wpa_supplicant {
  #endif /* CONFIG_CTRL_IFACE_BINDER */
        char bridge_ifname[16];
  
        char *confname;
        char *confanother;
  
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -2408,6 +2408,11 @@ static int hostapd_ctrl_iface_chan_switc
+       if (ret)
+               return ret;
++      if (os_strstr(pos, " auto-ht")) {
++              settings.freq_params.ht_enabled = iface->conf->ieee80211n;
++              settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
++      }
++
+       for (i = 0; i < iface->num_bss; i++) {
+               /* Save CHAN_SWITCH VHT config */
+--- a/src/ap/beacon.c
++++ b/src/ap/beacon.c
+@@ -1403,11 +1403,6 @@ int ieee802_11_set_beacon(struct hostapd
+       struct wpabuf *beacon, *proberesp, *assocresp;
+       int res, ret = -1;
+-      if (hapd->csa_in_progress) {
+-              wpa_printf(MSG_ERROR, "Cannot set beacons during CSA period");
+-              return -1;
+-      }
+-
+       hapd->beacon_set_done = 1;
+       if (ieee802_11_build_ap_params(hapd, &params) < 0)