aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-25 16:48:45 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-25 16:48:45 +0000
commit7d5e12fd4d09de4c3929505bf6d03f0b8f1ab625 (patch)
treef82215517cc67313c7dfe7fe4fc6d2a39f9fd6dc /package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch
parente9cc6b9ec7ce4247e50ebcba0092b3dbaa32a785 (diff)
downloadmaster-187ad058-7d5e12fd4d09de4c3929505bf6d03f0b8f1ab625.tar.gz
master-187ad058-7d5e12fd4d09de4c3929505bf6d03f0b8f1ab625.tar.bz2
master-187ad058-7d5e12fd4d09de4c3929505bf6d03f0b8f1ab625.zip
hostapd: update to 2014-10-25
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43059 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch')
-rw-r--r--package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch191
1 files changed, 0 insertions, 191 deletions
diff --git a/package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch
deleted file mode 100644
index 9f4a5f5ec0..0000000000
--- a/package/network/services/hostapd/patches/500-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From 4bb69d15477e0f2b00e166845341dc933de47c58 Mon Sep 17 00:00:00 2001
-From: Antonio Quartulli <ordex@autistici.org>
-Date: Sun, 3 Jun 2012 18:22:56 +0200
-Subject: [PATCHv2 601/602] wpa_supplicant: add new config params to be used
- with the ibss join command
-
-Signed-hostap: Antonio Quartulli <ordex@autistici.org>
----
- src/drivers/driver.h | 6 +++
- wpa_supplicant/config.c | 96 +++++++++++++++++++++++++++++++++++++++
- wpa_supplicant/config_ssid.h | 6 +++
- wpa_supplicant/wpa_supplicant.c | 23 +++++++---
- 4 files changed, 124 insertions(+), 7 deletions(-)
-
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -19,6 +19,7 @@
-
- #define WPA_SUPPLICANT_DRIVER_VERSION 4
-
-+#include "drivers/nl80211_copy.h"
- #include "common/defs.h"
- #include "utils/list.h"
-
-@@ -414,6 +415,11 @@ struct wpa_driver_associate_params {
- * responsible for selecting with which BSS to associate. */
- const u8 *bssid;
-
-+ int beacon_interval;
-+ int fixed_freq;
-+ unsigned char rates[NL80211_MAX_SUPP_RATES];
-+ int mcast_rate;
-+
- /**
- * bssid_hint - BSSID of a proposed AP
- *
---- a/wpa_supplicant/config.c
-+++ b/wpa_supplicant/config.c
-@@ -15,6 +15,7 @@
- #include "rsn_supp/wpa.h"
- #include "eap_peer/eap.h"
- #include "p2p/p2p.h"
-+#include "drivers/nl80211_copy.h"
- #include "config.h"
-
-
-@@ -1527,6 +1528,97 @@ static char * wpa_config_write_psk_list(
-
- #endif /* CONFIG_P2P */
-
-+static int wpa_config_parse_mcast_rate(const struct parse_data *data,
-+ struct wpa_ssid *ssid, int line,
-+ const char *value)
-+{
-+ ssid->mcast_rate = (int)(strtod(value, NULL) * 10);
-+
-+ return 0;
-+}
-+
-+#ifndef NO_CONFIG_WRITE
-+static char * wpa_config_write_mcast_rate(const struct parse_data *data,
-+ struct wpa_ssid *ssid)
-+{
-+ char *value;
-+ int res;
-+
-+ if (!ssid->mcast_rate == 0)
-+ return NULL;
-+
-+ value = os_malloc(6); /* longest: 300.0 */
-+ if (value == NULL)
-+ return NULL;
-+ res = os_snprintf(value, 5, "%.1f", (double)ssid->mcast_rate / 10);
-+ if (res < 0) {
-+ os_free(value);
-+ return NULL;
-+ }
-+ return value;
-+}
-+#endif /* NO_CONFIG_WRITE */
-+
-+static int wpa_config_parse_rates(const struct parse_data *data,
-+ struct wpa_ssid *ssid, int line,
-+ const char *value)
-+{
-+ int i;
-+ char *pos, *r, *sptr, *end;
-+ double rate;
-+
-+ pos = (char *)value;
-+ r = strtok_r(pos, ",", &sptr);
-+ i = 0;
-+ while (pos && i < NL80211_MAX_SUPP_RATES) {
-+ rate = 0.0;
-+ if (r)
-+ rate = strtod(r, &end);
-+ ssid->rates[i] = rate * 2;
-+ if (*end != '\0' || rate * 2 != ssid->rates[i])
-+ return 1;
-+
-+ i++;
-+ r = strtok_r(NULL, ",", &sptr);
-+ }
-+
-+ return 0;
-+}
-+
-+#ifndef NO_CONFIG_WRITE
-+static char * wpa_config_write_rates(const struct parse_data *data,
-+ struct wpa_ssid *ssid)
-+{
-+ char *value, *pos;
-+ int res, i;
-+
-+ if (ssid->rates[0] <= 0)
-+ return NULL;
-+
-+ value = os_malloc(6 * NL80211_MAX_SUPP_RATES + 1);
-+ if (value == NULL)
-+ return NULL;
-+ pos = value;
-+ for (i = 0; i < NL80211_MAX_SUPP_RATES - 1; i++) {
-+ res = os_snprintf(pos, 6, "%.1f,", (double)ssid->rates[i] / 2);
-+ if (res < 0) {
-+ os_free(value);
-+ return NULL;
-+ }
-+ pos += res;
-+ }
-+ res = os_snprintf(pos, 6, "%.1f",
-+ (double)ssid->rates[NL80211_MAX_SUPP_RATES - 1] / 2);
-+ if (res < 0) {
-+ os_free(value);
-+ return NULL;
-+ }
-+
-+ value[6 * NL80211_MAX_SUPP_RATES] = '\0';
-+ return value;
-+}
-+#endif /* NO_CONFIG_WRITE */
-+
- /* Helper macros for network block parser */
-
- #ifdef OFFSET
-@@ -1733,6 +1825,9 @@ static const struct parse_data ssid_fiel
- { INT(ap_max_inactivity) },
- { INT(dtim_period) },
- { INT(beacon_int) },
-+ { INT_RANGE(fixed_freq, 0, 1) },
-+ { FUNC(rates) },
-+ { FUNC(mcast_rate) },
- #ifdef CONFIG_MACSEC
- { INT_RANGE(macsec_policy, 0, 1) },
- #endif /* CONFIG_MACSEC */
---- a/wpa_supplicant/config_ssid.h
-+++ b/wpa_supplicant/config_ssid.h
-@@ -12,6 +12,7 @@
- #include "common/defs.h"
- #include "utils/list.h"
- #include "eap_peer/eap_config.h"
-+#include "drivers/nl80211_copy.h"
-
- #define MAX_SSID_LEN 32
-
-@@ -637,6 +638,10 @@ struct wpa_ssid {
- */
- void *parent_cred;
-
-+ int fixed_freq;
-+ unsigned char rates[NL80211_MAX_SUPP_RATES];
-+ double mcast_rate;
-+
- #ifdef CONFIG_MACSEC
- /**
- * macsec_policy - Determines the policy for MACsec secure session
---- a/wpa_supplicant/wpa_supplicant.c
-+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1806,6 +1806,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) {
-+ params.rates[i] = ssid->rates[i];
-+ i++;
-+ }
-+ params.mcast_rate = ssid->mcast_rate;
- }
-
- params.wpa_ie = wpa_ie;