Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] wpa_supplicant: Change function call for new API
Browse files Browse the repository at this point in the history
fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

An interactive API will use for wpa_cli commands.
For wpa_cli_cmd function will discriminate between wifi
and wpa_cli commands. So, need to change directly function call
of wpa_ctrl_command to wpa_cli_cmd.

Signed-off-by: Kapil Bhatt <[email protected]>
  • Loading branch information
kapbh committed Dec 19, 2023
1 parent 7f6ad6f commit ead9832
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions wpa_supplicant/wpa_cli_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc,
static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
return wpa_ctrl_command(ctrl, "ADD_NETWORK");
return wpa_cli_cmd(ctrl, "ADD_NETWORK", 0, argc, argv);
}


Expand All @@ -288,19 +288,19 @@ static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc,
static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
return wpa_ctrl_command(ctrl, "DISCONNECT");
return wpa_cli_cmd(ctrl, "DISCONNECT", 0, argc, argv);
}


static int wpa_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
if (argc > 0 && os_strcmp(argv[0], "verbose") == 0)
return wpa_ctrl_command(ctrl, "STATUS-VERBOSE");
return wpa_cli_cmd(ctrl, "STATUS-VERBOSE", 0, argc, argv);
if (argc > 0 && os_strcmp(argv[0], "wps") == 0)
return wpa_ctrl_command(ctrl, "STATUS-WPS");
return wpa_cli_cmd(ctrl, "STATUS-WPS", 0, argc, argv);
if (argc > 0 && os_strcmp(argv[0], "driver") == 0)
return wpa_ctrl_command(ctrl, "STATUS-DRIVER");
return wpa_ctrl_command(ctrl, "STATUS");
return wpa_cli_cmd(ctrl, "STATUS-DRIVER", 0, argc, argv);
return wpa_cli_cmd(ctrl, "STATUS", 0, argc, argv);
}


Expand Down Expand Up @@ -333,7 +333,7 @@ static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc,
if (os_snprintf_error(sizeof(cmd), res))
return -1;
cmd[sizeof(cmd) - 1] = '\0';
return wpa_ctrl_command(ctrl, cmd);
return wpa_cli_cmd(ctrl, cmd, 0, argc, argv);
}


Expand All @@ -347,7 +347,7 @@ static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc,
static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
return wpa_ctrl_command(ctrl, "INTERFACE_LIST");
return wpa_cli_cmd(ctrl, "INTERFACE_LIST", 0, argc, argv);
}


Expand Down

0 comments on commit ead9832

Please sign in to comment.