aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-25 15:43:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-11-25 15:43:15 +0000
commit5d000ddd9e970237c8ae823e83ee9e5c63ebeadb (patch)
tree11e79902b11c32d7e2186f6a5257cea2ce53d14a /package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
parent77bba4261a68be8fabafe35c317ad1333f74318c (diff)
downloadmaster-187ad058-5d000ddd9e970237c8ae823e83ee9e5c63ebeadb.tar.gz
master-187ad058-5d000ddd9e970237c8ae823e83ee9e5c63ebeadb.tar.bz2
master-187ad058-5d000ddd9e970237c8ae823e83ee9e5c63ebeadb.zip
hostapd: update to version 2013-11-20
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38914 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd/patches/452-ctrl_iface_reload.patch')
-rw-r--r--package/network/services/hostapd/patches/452-ctrl_iface_reload.patch98
1 files changed, 0 insertions, 98 deletions
diff --git a/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
deleted file mode 100644
index 7459a0f7cd..0000000000
--- a/package/network/services/hostapd/patches/452-ctrl_iface_reload.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -34,6 +34,7 @@
- #include "wps/wps.h"
- #include "config_file.h"
- #include "ctrl_iface.h"
-+#include "config_file.h"
-
-
- struct wpa_ctrl_dst {
-@@ -44,6 +45,7 @@ struct wpa_ctrl_dst {
- int errors;
- };
-
-+static char *reload_opts = NULL;
-
- static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level,
- const char *buf, size_t len);
-@@ -153,6 +155,68 @@ static int hostapd_ctrl_iface_new_sta(st
- return 0;
- }
-
-+static int hostapd_ctrl_iface_set_down(struct hostapd_data *hapd)
-+{
-+ if (hapd->driver->stop_ap)
-+ hapd->driver->stop_ap(hapd->drv_priv);
-+ return 0;
-+}
-+
-+static char *get_option(char *opt, char *str)
-+{
-+ int len = strlen(str);
-+
-+ if (!strncmp(opt, str, len))
-+ return opt + len;
-+ else
-+ return NULL;
-+}
-+
-+static struct hostapd_config *hostapd_ctrl_iface_config_read(const char *fname)
-+{
-+ struct hostapd_config *conf;
-+ char *opt, *val;
-+
-+ conf = hostapd_config_read(fname);
-+ if (!conf)
-+ return NULL;
-+
-+ for (opt = strtok(reload_opts, " ");
-+ opt;
-+ opt = strtok(NULL, " ")) {
-+
-+ if ((val = get_option(opt, "channel=")))
-+ conf->channel = atoi(val);
-+ else if ((val = get_option(opt, "ht_capab=")))
-+ conf->ht_capab = atoi(val);
-+ else if ((val = get_option(opt, "ht_capab_mask=")))
-+ conf->ht_capab &= atoi(val);
-+ else if ((val = get_option(opt, "sec_chan=")))
-+ conf->secondary_channel = atoi(val);
-+ else if ((val = get_option(opt, "hw_mode=")))
-+ conf->hw_mode = atoi(val);
-+ else if ((val = get_option(opt, "ieee80211n=")))
-+ conf->ieee80211n = atoi(val);
-+ else
-+ break;
-+ }
-+
-+ return conf;
-+}
-+
-+static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
-+{
-+ struct hostapd_config * (*config_read_cb)(const char *config_fname);
-+ struct hostapd_iface *iface = hapd->iface;
-+
-+ config_read_cb = iface->interfaces->config_read_cb;
-+ iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read;
-+ reload_opts = txt;
-+
-+ hostapd_reload_config(iface);
-+
-+ iface->interfaces->config_read_cb = config_read_cb;
-+}
-
- #ifdef CONFIG_IEEE80211W
- #ifdef NEED_AP_MLME
-@@ -949,6 +1013,10 @@ static void hostapd_ctrl_iface_receive(i
- reply_len += res;
- }
- #endif /* CONFIG_NO_RADIUS */
-+ } else if (os_strcmp(buf, "DOWN") == 0) {
-+ hostapd_ctrl_iface_set_down(hapd);
-+ } else if (os_strncmp(buf, "UPDATE ", 7) == 0) {
-+ hostapd_ctrl_iface_update(hapd, buf + 7);
- } else if (os_strcmp(buf, "STA-FIRST") == 0) {
- reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
- reply_size);