diff --git a/hostapd/hostapd_cli_zephyr.c b/hostapd/hostapd_cli_zephyr.c index 6647c70df7..f57abd2a35 100644 --- a/hostapd/hostapd_cli_zephyr.c +++ b/hostapd/hostapd_cli_zephyr.c @@ -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; } diff --git a/hostapd/hostapd_cli_zephyr.h b/hostapd/hostapd_cli_zephyr.h index ccc2390752..0d82716915 100644 --- a/hostapd/hostapd_cli_zephyr.h +++ b/hostapd/hostapd_cli_zephyr.h @@ -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_ */ diff --git a/src/drivers/driver_zephyr.c b/src/drivers/driver_zephyr.c index 882561f49a..1ee469424c 100644 --- a/src/drivers/driver_zephyr.c +++ b/src/drivers/driver_zephyr.c @@ -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;