hostapd: update to version 2016-09-05
[openwrt/staging/dedeckeh.git] / package / network / services / hostapd / patches / 460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index 426ffc5148c2d5d8186e07097273da54eb08551b..c6053f095338125fdad1a766ef2d2d9ee4ba04c2 100644 (file)
@@ -18,15 +18,15 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  
  #define WPA_SUPPLICANT_DRIVER_VERSION 4
  
-+#include "drivers/nl80211_copy.h"
++#include "ap/sta_info.h"
  #include "common/defs.h"
  #include "common/ieee802_11_defs.h"
  #include "utils/list.h"
-@@ -570,6 +571,9 @@ struct wpa_driver_associate_params {
+@@ -587,6 +588,9 @@ struct wpa_driver_associate_params {
         * responsible for selecting with which BSS to associate. */
        const u8 *bssid;
  
-+      unsigned char rates[NL80211_MAX_SUPP_RATES];
++      unsigned char rates[WLAN_SUPP_RATES_MAX];
 +      int mcast_rate;
 +
        /**
@@ -38,11 +38,11 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  #include "eap_peer/eap.h"
  #include "p2p/p2p.h"
  #include "fst/fst.h"
-+#include "drivers/nl80211_copy.h"
++#include "ap/sta_info.h"
  #include "config.h"
  
  
-@@ -1742,6 +1743,97 @@ static char * wpa_config_write_mesh_basi
+@@ -1816,6 +1817,97 @@ static char * wpa_config_write_mesh_basi
  #endif /* CONFIG_MESH */
  
  
@@ -88,7 +88,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
 +      pos = (char *)value;
 +      r = strtok_r(pos, ",", &sptr);
 +      i = 0;
-+      while (pos && i < NL80211_MAX_SUPP_RATES) {
++      while (pos && i < WLAN_SUPP_RATES_MAX) {
 +              rate = 0.0;
 +              if (r)
 +                      rate = strtod(r, &end);
@@ -113,11 +113,11 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
 +      if (ssid->rates[0] <= 0)
 +              return NULL;
 +
-+      value = os_malloc(6 * NL80211_MAX_SUPP_RATES + 1);
++      value = os_malloc(6 * WLAN_SUPP_RATES_MAX + 1);
 +      if (value == NULL)
 +              return NULL;
 +      pos = value;
-+      for (i = 0; i < NL80211_MAX_SUPP_RATES - 1; i++) {
++      for (i = 0; i < WLAN_SUPP_RATES_MAX - 1; i++) {
 +              res = os_snprintf(pos, 6, "%.1f,", (double)ssid->rates[i] / 2);
 +              if (res < 0) {
 +                      os_free(value);
@@ -126,13 +126,13 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
 +              pos += res;
 +      }
 +      res = os_snprintf(pos, 6, "%.1f",
-+                        (double)ssid->rates[NL80211_MAX_SUPP_RATES - 1] / 2);
++                        (double)ssid->rates[WLAN_SUPP_RATES_MAX - 1] / 2);
 +      if (res < 0) {
 +              os_free(value);
 +              return NULL;
 +      }
 +
-+      value[6 * NL80211_MAX_SUPP_RATES] = '\0';
++      value[6 * WLAN_SUPP_RATES_MAX] = '\0';
 +      return value;
 +}
 +#endif /* NO_CONFIG_WRITE */
@@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  /* Helper macros for network block parser */
  
  #ifdef OFFSET
-@@ -1973,6 +2065,9 @@ static const struct parse_data ssid_fiel
+@@ -2048,6 +2140,9 @@ static const struct parse_data ssid_fiel
        { INT(ap_max_inactivity) },
        { INT(dtim_period) },
        { INT(beacon_int) },
@@ -152,19 +152,22 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  #endif /* CONFIG_MACSEC */
 --- a/wpa_supplicant/config_ssid.h
 +++ b/wpa_supplicant/config_ssid.h
-@@ -12,6 +12,7 @@
+@@ -10,8 +10,10 @@
+ #define CONFIG_SSID_H
  #include "common/defs.h"
++#include "ap/sta_info.h"
  #include "utils/list.h"
  #include "eap_peer/eap_config.h"
 +#include "drivers/nl80211_copy.h"
  
  
  #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
-@@ -698,6 +699,9 @@ struct wpa_ssid {
+@@ -719,6 +721,9 @@ struct wpa_ssid {
         */
        void *parent_cred;
  
-+      unsigned char rates[NL80211_MAX_SUPP_RATES];
++      unsigned char rates[WLAN_SUPP_RATES_MAX];
 +      double mcast_rate;
 +
  #ifdef CONFIG_MACSEC
@@ -172,13 +175,13 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
         * macsec_policy - Determines the policy for MACsec secure session
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2421,6 +2421,13 @@ static void wpas_start_assoc_cb(struct w
+@@ -2527,6 +2527,13 @@ static void wpas_start_assoc_cb(struct w
                        params.beacon_int = ssid->beacon_int;
                else
                        params.beacon_int = wpa_s->conf->beacon_int;
 +              params.fixed_freq = ssid->fixed_freq;
 +              i = 0;
-+              while (i < NL80211_MAX_SUPP_RATES) {
++              while (i < WLAN_SUPP_RATES_MAX) {
 +                      params.rates[i] = ssid->rates[i];
 +                      i++;
 +              }