]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Remove old OOB NFC interface
authorJouni Malinen <j@w1.fi>
Sun, 28 Oct 2012 16:20:03 +0000 (18:20 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 28 Oct 2012 16:20:03 +0000 (18:20 +0200)
The old WPS interface for using NFC has no known deployments and even
the binary libraries referenced here are not easily available anymore.
Since the new interface for using NFC with WPS covers the same
functionality, remove the old implementation to clean up WPS
implementation.

Signed-hostap: Jouni Malinen <j@w1.fi>

18 files changed:
hostapd/Android.mk
hostapd/Makefile
hostapd/ctrl_iface.c
hostapd/hostapd_cli.c
src/ap/wps_hostapd.c
src/ap/wps_hostapd.h
src/wps/wps.h
src/wps/wps_common.c
src/wps/wps_i.h
src/wps/wps_nfc.c [deleted file]
src/wps/wps_nfc_pn531.c [deleted file]
src/wps/wps_ufd.c
wpa_supplicant/Android.mk
wpa_supplicant/Makefile
wpa_supplicant/ctrl_iface.c
wpa_supplicant/wpa_cli.c
wpa_supplicant/wps_supplicant.c
wpa_supplicant/wps_supplicant.h

index 475bdd8f1a148df2664a54a99c3453987c9eb488..7c29a5f65ea4f78dd7052ce9be82fa01e66492b6 100644 (file)
@@ -378,16 +378,7 @@ endif
 ifdef CONFIG_WPS_NFC
 L_CFLAGS += -DCONFIG_WPS_NFC
 OBJS += src/wps/ndef.c
-OBJS += src/wps/wps_nfc.c
 NEED_WPS_OOB=y
-ifdef CONFIG_WPS_NFC_PN531
-PN531_PATH ?= /usr/local/src/nfc
-L_CFLAGS += -DCONFIG_WPS_NFC_PN531
-L_CFLAGS += -I${PN531_PATH}/inc
-OBJS += src/wps/wps_nfc_pn531.c
-LIBS += ${PN531_PATH}/lib/wpsnfc.dll
-LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
-endif
 endif
 
 ifdef NEED_WPS_OOB
index 277e1d4625b27e6dc2a41da648e7f5d8f17a6a71..e3d9e6937ff06019d4d44c86ddd829e001c1cac6 100644 (file)
@@ -370,16 +370,7 @@ endif
 ifdef CONFIG_WPS_NFC
 CFLAGS += -DCONFIG_WPS_NFC
 OBJS += ../src/wps/ndef.o
-OBJS += ../src/wps/wps_nfc.o
 NEED_WPS_OOB=y
-ifdef CONFIG_WPS_NFC_PN531
-PN531_PATH ?= /usr/local/src/nfc
-CFLAGS += -DCONFIG_WPS_NFC_PN531
-CFLAGS += -I${PN531_PATH}/inc
-OBJS += ../src/wps/wps_nfc_pn531.o
-LIBS += ${PN531_PATH}/lib/wpsnfc.dll
-LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
-endif
 endif
 
 ifdef NEED_WPS_OOB
index 1b8bede1adc2a4028d05873404aef286228ef8da..2faef7af63190a9133f0494a41b9afeacdee43a3 100644 (file)
@@ -253,7 +253,7 @@ static int hostapd_ctrl_iface_wps_check_pin(
 #ifdef CONFIG_WPS_OOB
 static int hostapd_ctrl_iface_wps_oob(struct hostapd_data *hapd, char *txt)
 {
-       char *path, *method, *name;
+       char *path, *method;
 
        path = os_strchr(txt, ' ');
        if (path == NULL)
@@ -265,11 +265,7 @@ static int hostapd_ctrl_iface_wps_oob(struct hostapd_data *hapd, char *txt)
                return -1;
        *method++ = '\0';
 
-       name = os_strchr(method, ' ');
-       if (name != NULL)
-               *name++ = '\0';
-
-       return hostapd_wps_start_oob(hapd, txt, path, method, name);
+       return hostapd_wps_start_oob(hapd, txt, path, method);
 }
 #endif /* CONFIG_WPS_OOB */
 
index aed981c4304687b12ff0b6a51d355bc37d795297..54e9b705b4726ab54aecbfd8bddab514e003f80a 100644 (file)
@@ -412,24 +412,18 @@ static int hostapd_cli_cmd_wps_oob(struct wpa_ctrl *ctrl, int argc,
        char cmd[256];
        int res;
 
-       if (argc != 3 && argc != 4) {
-               printf("Invalid WPS_OOB command: need three or four "
+       if (argc != 3) {
+               printf("Invalid WPS_OOB command: need three "
                       "arguments:\n"
-                      "- DEV_TYPE: use 'ufd' or 'nfc'\n"
+                      "- DEV_TYPE: use 'ufd'\n"
                       "- PATH: path of OOB device like '/mnt'\n"
                       "- METHOD: OOB method 'pin-e' or 'pin-r', "
-                      "'cred'\n"
-                      "- DEV_NAME: (only for NFC) device name like "
-                      "'pn531'\n");
+                      "'cred'\n");
                return -1;
        }
 
-       if (argc == 3)
-               res = os_snprintf(cmd, sizeof(cmd), "WPS_OOB %s %s %s",
-                                 argv[0], argv[1], argv[2]);
-       else
-               res = os_snprintf(cmd, sizeof(cmd), "WPS_OOB %s %s %s %s",
-                                 argv[0], argv[1], argv[2], argv[3]);
+       res = os_snprintf(cmd, sizeof(cmd), "WPS_OOB %s %s %s",
+                         argv[0], argv[1], argv[2]);
        if (res < 0 || (size_t) res >= sizeof(cmd) - 1) {
                printf("Too long WPS_OOB command.\n");
                return -1;
index 5e44c72c52b375dd2f454ed30b9a0f2494106629..ffef16eb673b29d5723eb2d44d67a5a903a487dd 100644 (file)
@@ -1157,7 +1157,7 @@ int hostapd_wps_cancel(struct hostapd_data *hapd)
 
 #ifdef CONFIG_WPS_OOB
 int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
-                         char *path, char *method, char *name)
+                         char *path, char *method)
 {
        struct wps_context *wps = hapd->wps;
        struct oob_device_data *oob_dev;
@@ -1166,7 +1166,6 @@ int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
        if (oob_dev == NULL)
                return -1;
        oob_dev->device_path = path;
-       oob_dev->device_name = name;
        wps->oob_conf.oob_method = wps_get_oob_method(method);
 
        if (wps->oob_conf.oob_method == OOB_METHOD_DEV_PWD_R) {
index f968e151fe1f8daafa928e2da7195b472f07458c..b9c9530df591a44551e47cb8611564677735928d 100644 (file)
@@ -22,7 +22,7 @@ int hostapd_wps_button_pushed(struct hostapd_data *hapd,
                              const u8 *p2p_dev_addr);
 int hostapd_wps_cancel(struct hostapd_data *hapd);
 int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
-                         char *path, char *method, char *name);
+                         char *path, char *method);
 int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
                            char *buf, size_t buflen);
 void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
index 74304dc23ff100e1fdbf14abf0b965a5479b7632..9ebbbf87aab1492be89bd2091d9283c53cb8dd75 100644 (file)
@@ -767,7 +767,6 @@ struct wps_context {
 };
 
 struct oob_device_data {
-       char *device_name;
        char *device_path;
        void * (*init_func)(struct wps_context *, struct oob_device_data *,
                            int);
@@ -776,13 +775,6 @@ struct oob_device_data {
        void (*deinit_func)(void *);
 };
 
-struct oob_nfc_device_data {
-       int (*init_func)(char *);
-       void * (*read_func)(size_t *);
-       int (*write_func)(void *, size_t);
-       void (*deinit_func)(void);
-};
-
 struct wps_registrar *
 wps_registrar_init(struct wps_context *wps,
                   const struct wps_registrar_config *cfg);
@@ -822,7 +814,6 @@ int wps_pin_str_valid(const char *pin);
 void wps_free_pending_msgs(struct upnp_pending_message *msgs);
 
 struct oob_device_data * wps_get_oob_device(char *device_type);
-struct oob_nfc_device_data * wps_get_oob_nfc_device(char *device_name);
 int wps_get_oob_method(char *method);
 int wps_process_oob(struct wps_context *wps, struct oob_device_data *oob_dev,
                    int registrar);
index 5a8817f260b8e58d3af36d9d2ee0f49fd66b8e4c..f48bd3bd8e44a3849f321b4dcb070087046621a3 100644 (file)
@@ -543,30 +543,11 @@ struct oob_device_data * wps_get_oob_device(char *device_type)
        if (os_strstr(device_type, "ufd") != NULL)
                return &oob_ufd_device_data;
 #endif /* CONFIG_WPS_UFD */
-#ifdef CONFIG_WPS_NFC
-       if (os_strstr(device_type, "nfc") != NULL)
-               return &oob_nfc_device_data;
-#endif /* CONFIG_WPS_NFC */
 
        return NULL;
 }
 
 
-#ifdef CONFIG_WPS_NFC
-struct oob_nfc_device_data * wps_get_oob_nfc_device(char *device_name)
-{
-       if (device_name == NULL)
-               return NULL;
-#ifdef CONFIG_WPS_NFC_PN531
-       if (os_strstr(device_name, "pn531") != NULL)
-               return &oob_nfc_pn531_device_data;
-#endif /* CONFIG_WPS_NFC_PN531 */
-
-       return NULL;
-}
-#endif /* CONFIG_WPS_NFC */
-
-
 int wps_get_oob_method(char *method)
 {
        if (os_strstr(method, "pin-e") != NULL)
index 86ad248d374ce1d6be059631c6e55d9115e6ff96..e89424b04370e688e563271a54fa3e78e691547d 100644 (file)
@@ -138,8 +138,6 @@ void wps_pbc_overlap_event(struct wps_context *wps);
 void wps_pbc_timeout_event(struct wps_context *wps);
 
 extern struct oob_device_data oob_ufd_device_data;
-extern struct oob_device_data oob_nfc_device_data;
-extern struct oob_nfc_device_data oob_nfc_pn531_device_data;
 
 struct wpabuf * wps_build_wsc_ack(struct wps_data *wps);
 struct wpabuf * wps_build_wsc_nack(struct wps_data *wps);
diff --git a/src/wps/wps_nfc.c b/src/wps/wps_nfc.c
deleted file mode 100644 (file)
index 6804350..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * NFC routines for Wi-Fi Protected Setup
- * Copyright (c) 2009-2012, Masashi Honma <masashi.honma@gmail.com>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#include "includes.h"
-#include "common.h"
-
-#include "wps/wps.h"
-#include "wps_i.h"
-
-
-struct wps_nfc_data {
-       struct oob_nfc_device_data *oob_nfc_dev;
-};
-
-
-static void * init_nfc(struct wps_context *wps,
-                      struct oob_device_data *oob_dev, int registrar)
-{
-       struct oob_nfc_device_data *oob_nfc_dev;
-       struct wps_nfc_data *data;
-
-       oob_nfc_dev = wps_get_oob_nfc_device(oob_dev->device_name);
-       if (oob_nfc_dev == NULL) {
-               wpa_printf(MSG_ERROR, "WPS (NFC): Unknown NFC device (%s)",
-                          oob_dev->device_name);
-               return NULL;
-       }
-
-       if (oob_nfc_dev->init_func(oob_dev->device_path) < 0)
-               return NULL;
-
-       data = os_zalloc(sizeof(*data));
-       if (data == NULL) {
-               wpa_printf(MSG_ERROR, "WPS (NFC): Failed to allocate "
-                          "nfc data area");
-               return NULL;
-       }
-       data->oob_nfc_dev = oob_nfc_dev;
-       return data;
-}
-
-
-static struct wpabuf * read_nfc(void *priv)
-{
-       struct wps_nfc_data *data = priv;
-       struct wpabuf *wifi, *buf;
-       char *raw_data;
-       size_t len;
-
-       raw_data = data->oob_nfc_dev->read_func(&len);
-       if (raw_data == NULL)
-               return NULL;
-
-       wifi = wpabuf_alloc_copy(raw_data, len);
-       os_free(raw_data);
-       if (wifi == NULL) {
-               wpa_printf(MSG_ERROR, "WPS (NFC): Failed to allocate "
-                          "nfc read area");
-               return NULL;
-       }
-
-       buf = ndef_parse_wifi(wifi);
-       wpabuf_free(wifi);
-       if (buf == NULL)
-               wpa_printf(MSG_ERROR, "WPS (NFC): Failed to unwrap");
-       return buf;
-}
-
-
-static int write_nfc(void *priv, struct wpabuf *buf)
-{
-       struct wps_nfc_data *data = priv;
-       struct wpabuf *wifi;
-       int ret;
-
-       wifi = ndef_build_wifi(buf);
-       if (wifi == NULL) {
-               wpa_printf(MSG_ERROR, "WPS (NFC): Failed to wrap");
-               return -1;
-       }
-
-       ret = data->oob_nfc_dev->write_func(wpabuf_mhead(wifi),
-                                           wpabuf_len(wifi));
-       wpabuf_free(wifi);
-       return ret;
-}
-
-
-static void deinit_nfc(void *priv)
-{
-       struct wps_nfc_data *data = priv;
-
-       data->oob_nfc_dev->deinit_func();
-
-       os_free(data);
-}
-
-
-struct oob_device_data oob_nfc_device_data = {
-       .device_name    = NULL,
-       .device_path    = NULL,
-       .init_func      = init_nfc,
-       .read_func      = read_nfc,
-       .write_func     = write_nfc,
-       .deinit_func    = deinit_nfc,
-};
diff --git a/src/wps/wps_nfc_pn531.c b/src/wps/wps_nfc_pn531.c
deleted file mode 100644 (file)
index c2bf457..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * NFC PN531 routines for Wi-Fi Protected Setup
- * Copyright (c) 2009-2012, Masashi Honma <masashi.honma@gmail.com>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#include "includes.h"
-#include "common.h"
-
-#include "wps/wps.h"
-#include "wps_i.h"
-
-#include "WpsNfcType.h"
-#include "WpsNfc.h"
-
-
-static int init_nfc_pn531(char *path)
-{
-       u32 ret;
-
-       ret = WpsNfcInit();
-       if (ret != WPS_NFCLIB_ERR_SUCCESS) {
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to initialize "
-                          "NFC Library: 0x%08x", ret);
-               return -1;
-       }
-
-       ret = WpsNfcOpenDevice((int8 *) path);
-       if (ret != WPS_NFCLIB_ERR_SUCCESS) {
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to open "
-                          "NFC Device(%s): 0x%08x", path, ret);
-               goto fail;
-       }
-
-       ret = WpsNfcTokenDiscovery();
-       if (ret != WPS_NFCLIB_ERR_SUCCESS) {
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to discover "
-                          "token: 0x%08x", ret);
-               WpsNfcCloseDevice();
-               goto fail;
-       }
-
-       return 0;
-
-fail:
-       WpsNfcDeinit();
-       return -1;
-}
-
-
-static void * read_nfc_pn531(size_t *size)
-{
-       uint32 len;
-       u32 ret;
-       int8 *data;
-
-       ret = WpsNfcRawReadToken(&data, &len);
-       if (ret != WPS_NFCLIB_ERR_SUCCESS) {
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to read: 0x%08x",
-                          ret);
-               return NULL;
-       }
-
-       *size = len;
-       return data;
-}
-
-
-static int write_nfc_pn531(void *data, size_t len)
-{
-       u32 ret;
-
-       ret = WpsNfcRawWriteToken(data, len);
-       if (ret != WPS_NFCLIB_ERR_SUCCESS) {
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to write: 0x%08x",
-                          ret);
-               return -1;
-       }
-
-       return 0;
-}
-
-
-static void deinit_nfc_pn531(void)
-{
-       u32 ret;
-
-       ret = WpsNfcCloseDevice();
-       if (ret != WPS_NFCLIB_ERR_SUCCESS)
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to close "
-                          "NFC Device: 0x%08x", ret);
-
-       ret = WpsNfcDeinit();
-       if (ret != WPS_NFCLIB_ERR_SUCCESS)
-               wpa_printf(MSG_ERROR, "WPS (PN531): Failed to deinitialize "
-                          "NFC Library: 0x%08x", ret);
-}
-
-
-struct oob_nfc_device_data oob_nfc_pn531_device_data = {
-       .init_func      = init_nfc_pn531,
-       .read_func      = read_nfc_pn531,
-       .write_func     = write_nfc_pn531,
-       .deinit_func    = deinit_nfc_pn531,
-};
index f83bdf471c74a6a4ef8fad92026f530b65135766..6b51e6656991616400554ac53056cc535fbf975a 100644 (file)
@@ -221,7 +221,6 @@ static void deinit_ufd(void *priv)
 
 
 struct oob_device_data oob_ufd_device_data = {
-       .device_name    = NULL,
        .device_path    = NULL,
        .init_func      = init_ufd,
        .read_func      = read_ufd,
index cc334c8c205a76cfbb69a683516e33941ed833b1..d486a32ae5a8be0f834634c63989791cf5d9b3ec 100644 (file)
@@ -593,16 +593,7 @@ endif
 ifdef CONFIG_WPS_NFC
 L_CFLAGS += -DCONFIG_WPS_NFC
 OBJS += src/wps/ndef.c
-OBJS += src/wps/wps_nfc.c
 NEED_WPS_OOB=y
-ifdef CONFIG_WPS_NFC_PN531
-PN531_PATH ?= /usr/local/src/nfc
-L_CFLAGS += -DCONFIG_WPS_NFC_PN531
-L_CFLAGS += -I${PN531_PATH}/inc
-OBJS += src/wps/wps_nfc_pn531.c
-LIBS += ${PN531_PATH}/lib/wpsnfc.dll
-LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
-endif
 endif
 
 ifdef NEED_WPS_OOB
index 9684cfad9e2f36b0649d40e962d0b9b446035540..b33aa8f3ad03521ced06d05db4eccbbdb99130e5 100644 (file)
@@ -601,16 +601,7 @@ endif
 ifdef CONFIG_WPS_NFC
 CFLAGS += -DCONFIG_WPS_NFC
 OBJS += ../src/wps/ndef.o
-OBJS += ../src/wps/wps_nfc.o
 NEED_WPS_OOB=y
-ifdef CONFIG_WPS_NFC_PN531
-PN531_PATH ?= /usr/local/src/nfc
-CFLAGS += -DCONFIG_WPS_NFC_PN531
-CFLAGS += -I${PN531_PATH}/inc
-OBJS += ../src/wps/wps_nfc_pn531.o
-LIBS += ${PN531_PATH}/lib/wpsnfc.dll
-LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
-endif
 endif
 
 ifdef NEED_WPS_OOB
index 21b0e17b34eb01a3dbbca1adfe7ddce468848b75..2f0b38c78a8ceeebe656ec790e111bee64f13291 100644 (file)
@@ -754,7 +754,7 @@ static int wpa_supplicant_ctrl_iface_wps_check_pin(
 static int wpa_supplicant_ctrl_iface_wps_oob(struct wpa_supplicant *wpa_s,
                                             char *cmd)
 {
-       char *path, *method, *name;
+       char *path, *method;
 
        path = os_strchr(cmd, ' ');
        if (path == NULL)
@@ -766,11 +766,7 @@ static int wpa_supplicant_ctrl_iface_wps_oob(struct wpa_supplicant *wpa_s,
                return -1;
        *method++ = '\0';
 
-       name = os_strchr(method, ' ');
-       if (name != NULL)
-               *name++ = '\0';
-
-       return wpas_wps_start_oob(wpa_s, cmd, path, method, name);
+       return wpas_wps_start_oob(wpa_s, cmd, path, method);
 }
 #endif /* CONFIG_WPS_OOB */
 
index f7e622776f493ada82a674a3581849388a3b3147..eda41e781b6ed97dbf40fc1afd6a0f6210ffa755 100644 (file)
@@ -739,15 +739,13 @@ static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
 #ifdef CONFIG_WPS_OOB
 static int wpa_cli_cmd_wps_oob(struct wpa_ctrl *ctrl, int argc, char *argv[])
 {
-       if (argc != 3 && argc != 4) {
-               printf("Invalid WPS_OOB command: need three or four "
+       if (argc != 3) {
+               printf("Invalid WPS_OOB command: need three "
                       "arguments:\n"
-                      "- DEV_TYPE: use 'ufd' or 'nfc'\n"
+                      "- DEV_TYPE: use 'ufd'\n"
                       "- PATH: path of OOB device like '/mnt'\n"
                       "- METHOD: OOB method 'pin-e' or 'pin-r', "
-                      "'cred'\n"
-                      "- DEV_NAME: (only for NFC) device name like "
-                      "'pn531'\n");
+                      "'cred'\n");
                return -1;
        }
 
@@ -2490,7 +2488,7 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
 #ifdef CONFIG_WPS_OOB
        { "wps_oob", wpa_cli_cmd_wps_oob, NULL,
          cli_cmd_flag_sensitive,
-         "<DEV_TYPE> <PATH> <METHOD> [DEV_NAME] = start WPS OOB" },
+         "<DEV_TYPE> <PATH> <METHOD> = start WPS OOB" },
 #endif /* CONFIG_WPS_OOB */
 #ifdef CONFIG_WPS_NFC
        { "wps_nfc", wpa_cli_cmd_wps_nfc, wpa_cli_complete_bss,
index 5977e1a1a7e9ceb60836722f6b7455d5298cd1f0..41aa5dbd79c1d675c24b075fd75c708b51809cf9 100644 (file)
@@ -996,7 +996,7 @@ int wpas_wps_cancel(struct wpa_supplicant *wpa_s)
 
 #ifdef CONFIG_WPS_OOB
 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
-                      char *path, char *method, char *name)
+                      char *path, char *method)
 {
        struct wps_context *wps = wpa_s->wps;
        struct oob_device_data *oob_dev;
@@ -1005,7 +1005,6 @@ int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
        if (oob_dev == NULL)
                return -1;
        oob_dev->device_path = path;
-       oob_dev->device_name = name;
        wps->oob_conf.oob_method = wps_get_oob_method(method);
 
        if (wps->oob_conf.oob_method == OOB_METHOD_DEV_PWD_E) {
index 2a3fea0c95c697481dc84dbc584bb2c2a237c85b..4737f24a25549e88eb6e1a57c28f4df58a0aaf58 100644 (file)
@@ -36,7 +36,7 @@ int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
                       const char *pin, int p2p_group, u16 dev_pw_id);
 int wpas_wps_cancel(struct wpa_supplicant *wpa_s);
 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
-                      char *path, char *method, char *name);
+                      char *path, char *method);
 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
                       const char *pin, struct wps_new_ap_settings *settings);
 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,