]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unused NFC_RX_HANDOVER_REQ
authorJouni Malinen <j@w1.fi>
Sat, 15 Feb 2014 09:22:26 +0000 (11:22 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 15 Feb 2014 09:22:26 +0000 (11:22 +0200)
The more generic NFC_REPORT_HANDOVER is now used to report completed NFC
connection handover operations in either role and NFC_RX_HANDOVER_REQ
did not have any implementation within wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/wpa_cli.c
wpa_supplicant/wps_supplicant.c
wpa_supplicant/wps_supplicant.h

index 663f4097405135a96b6356aa2ce1550d47472ed9..02292931d6b901d20df5f87afc4956971f87b67f 100644 (file)
@@ -1106,34 +1106,6 @@ static int wpas_ctrl_nfc_get_handover_sel(struct wpa_supplicant *wpa_s,
 }
 
 
-static int wpas_ctrl_nfc_rx_handover_req(struct wpa_supplicant *wpa_s,
-                                        char *cmd, char *reply,
-                                        size_t max_len)
-{
-       size_t len;
-       struct wpabuf *buf;
-       int ret;
-
-       len = os_strlen(cmd);
-       if (len & 0x01)
-               return -1;
-       len /= 2;
-
-       buf = wpabuf_alloc(len);
-       if (buf == NULL)
-               return -1;
-       if (hexstr2bin(cmd, wpabuf_put(buf, len), len) < 0) {
-               wpabuf_free(buf);
-               return -1;
-       }
-
-       ret = wpas_wps_nfc_rx_handover_req(wpa_s, buf);
-       wpabuf_free(buf);
-
-       return ret;
-}
-
-
 static int wpas_ctrl_nfc_rx_handover_sel(struct wpa_supplicant *wpa_s,
                                         char *cmd)
 {
@@ -5924,9 +5896,6 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
        } else if (os_strncmp(buf, "NFC_GET_HANDOVER_SEL ", 21) == 0) {
                reply_len = wpas_ctrl_nfc_get_handover_sel(
                        wpa_s, buf + 21, reply, reply_size);
-       } else if (os_strncmp(buf, "NFC_RX_HANDOVER_REQ ", 20) == 0) {
-               reply_len = wpas_ctrl_nfc_rx_handover_req(
-                       wpa_s, buf + 20, reply, reply_size);
        } else if (os_strncmp(buf, "NFC_RX_HANDOVER_SEL ", 20) == 0) {
                if (wpas_ctrl_nfc_rx_handover_sel(wpa_s, buf + 20))
                        reply_len = -1;
index d66e8644368fa16337f398698bb64139264d22e5..6278806a5bd29adf022d6cb251647f32ae253a80 100644 (file)
@@ -836,32 +836,6 @@ static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc,
 }
 
 
-static int wpa_cli_cmd_nfc_rx_handover_req(struct wpa_ctrl *ctrl, int argc,
-                                          char *argv[])
-{
-       int ret;
-       char *buf;
-       size_t buflen;
-
-       if (argc != 1) {
-               printf("Invalid 'nfc_rx_handover_req' command - one argument "
-                      "is required.\n");
-               return -1;
-       }
-
-       buflen = 21 + os_strlen(argv[0]);
-       buf = os_malloc(buflen);
-       if (buf == NULL)
-               return -1;
-       os_snprintf(buf, buflen, "NFC_RX_HANDOVER_REQ %s", argv[0]);
-
-       ret = wpa_ctrl_command(ctrl, buf);
-       os_free(buf);
-
-       return ret;
-}
-
-
 static int wpa_cli_cmd_nfc_rx_handover_sel(struct wpa_ctrl *ctrl, int argc,
                                           char *argv[])
 {
@@ -2667,9 +2641,6 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
        { "nfc_get_handover_sel", wpa_cli_cmd_nfc_get_handover_sel, NULL,
          cli_cmd_flag_none,
          "<NDEF> <WPS> = create NFC handover select" },
-       { "nfc_rx_handover_req", wpa_cli_cmd_nfc_rx_handover_req, NULL,
-         cli_cmd_flag_none,
-         "<hexdump of payload> = report received NFC handover request" },
        { "nfc_rx_handover_sel", wpa_cli_cmd_nfc_rx_handover_sel, NULL,
          cli_cmd_flag_none,
          "<hexdump of payload> = report received NFC handover select" },
index 3c14bb75a9a685b84b46ad10b2b98198ac2d4305..c87fa3d2601935cf049e6baf88da59e4d8b8fb55 100644 (file)
@@ -2410,14 +2410,6 @@ struct wpabuf * wpas_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
 }
 
 
-int wpas_wps_nfc_rx_handover_req(struct wpa_supplicant *wpa_s,
-                                const struct wpabuf *data)
-{
-       /* TODO */
-       return -1;
-}
-
-
 int wpas_wps_nfc_rx_handover_sel(struct wpa_supplicant *wpa_s,
                                 const struct wpabuf *data)
 {
index 86e9d0915419f6d66b73d10a84ff3f26e31abbe3..39df2fb3428760faed58156da977e1e4b79816aa 100644 (file)
@@ -75,8 +75,6 @@ struct wpabuf * wpas_wps_nfc_handover_req(struct wpa_supplicant *wpa_s,
                                          int ndef);
 struct wpabuf * wpas_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
                                          int ndef, int cr, const char *uuid);
-int wpas_wps_nfc_rx_handover_req(struct wpa_supplicant *wpa_s,
-                                const struct wpabuf *data);
 int wpas_wps_nfc_rx_handover_sel(struct wpa_supplicant *wpa_s,
                                 const struct wpabuf *data);
 int wpas_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,