Skip to content

zephyr: support hostapd interface add del #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions hostapd/hostapd_cli_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,9 @@ static int hostapd_cli_open_connection(struct hostapd_data *hapd)

static void hostapd_cli_close_connection(struct hostapd_data *hapd)
{
int ret;

if (hapd_ctrl_conn == NULL)
return;

ret = wpa_ctrl_detach(hapd_ctrl_conn);
if (ret < 0) {
wpa_printf(MSG_INFO, "Failed to detach from wpa_supplicant: %s",
strerror(errno));
}
wpa_ctrl_close(hapd_ctrl_conn);
hapd_ctrl_conn = NULL;
}
Expand Down
1 change: 1 addition & 0 deletions hostapd/hostapd_cli_zephyr.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ int hostapd_ctrl_command_interactive(struct wpa_ctrl *ctrl, const char *cmd);
int zephyr_hostapd_cli_cmd_resp(const char *cmd, char *resp);
int zephyr_hostapd_cli_cmd_v(const char *fmt, ...);
int zephyr_hostapd_ctrl_init(void *ctx);
void zephyr_hostapd_ctrl_deinit(void *hapd);
int zephyr_hostapd_ctrl_zephyr_cmd(int argc, const char *argv[]);
#endif /* __HOSTAPD_CLI_ZEPHYR_H_ */
2 changes: 1 addition & 1 deletion src/drivers/driver_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ static void wpa_drv_zep_hapd_deinit(void *priv)

if_ctx = priv;

dev_ops = (struct zep_wpa_supp_dev_ops *)if_ctx->dev_ops;
dev_ops = get_dev_ops(if_ctx->dev_ctx);
if (!dev_ops->hapd_deinit) {
wpa_printf(MSG_ERROR, "%s: No op registered for hapd deinit", __func__);
return;
Expand Down