X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=package%2Fnetwork%2Fservices%2Fhostapd%2Fpatches%2F360-ctrl_iface_reload.patch;h=1e405cbf0edcda8604080f9c00f0eeb35c106218;hb=a4f8825e0ff5066a7c978f65a1b48407abba7a81;hp=e69c3d38b6afdba91e7c183c9bfc9f4c07c8c2f3;hpb=1617cf7da2c4c6441a9eefa1b913dadc53b9098b;p=15.05%2Fopenwrt.git diff --git a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch index e69c3d38b6..1e405cbf0e 100644 --- a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch +++ b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch @@ -1,32 +1,25 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -37,6 +37,7 @@ - #include "wps/wps.h" +@@ -54,6 +54,7 @@ + #include "fst/fst_ctrl_iface.h" #include "config_file.h" #include "ctrl_iface.h" +#include "config_file.h" - struct wpa_ctrl_dst { -@@ -47,6 +48,7 @@ struct wpa_ctrl_dst { - int errors; - }; + #define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 +@@ -72,6 +73,7 @@ static void hostapd_ctrl_iface_send(stru + enum wpa_msg_type type, + const char *buf, size_t len); +static char *reload_opts = NULL; - static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level, - const char *buf, size_t len); -@@ -156,6 +158,68 @@ static int hostapd_ctrl_iface_new_sta(st + static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd, + struct sockaddr_storage *from, +@@ -123,6 +125,61 @@ 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); @@ -85,14 +78,29 @@ #ifdef CONFIG_IEEE80211W #ifdef NEED_AP_MLME -@@ -1546,6 +1610,10 @@ static void hostapd_ctrl_iface_receive(i +@@ -2483,6 +2540,8 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "VENDOR ", 7) == 0) { reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply, reply_size); -+ } 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, "ERP_FLUSH") == 0) { + ieee802_1x_erp_flush(hapd); + #ifdef RADIUS_SERVER +--- a/src/ap/ctrl_iface_ap.c ++++ b/src/ap/ctrl_iface_ap.c +@@ -593,7 +593,13 @@ int hostapd_parse_csa_settings(const cha + + int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd) + { +- return hostapd_drv_stop_ap(hapd); ++ struct hostapd_iface *iface = hapd->iface; ++ int i; ++ ++ for (i = 0; i < iface->num_bss; i++) ++ hostapd_drv_stop_ap(iface->bss[i]); ++ ++ return 0; + } + - } else { - os_memcpy(reply, "UNKNOWN COMMAND\n", 16);