Skip to content

Commit f2c1b69

Browse files
committed
zephyr: support hostapd interface add del
Support hostapd interface add and del. Signed-off-by: Fengming Ye <[email protected]>
1 parent c55683c commit f2c1b69

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

hostapd/hostapd_cli_zephyr.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,9 @@ static int hostapd_cli_open_connection(struct hostapd_data *hapd)
262262

263263
static void hostapd_cli_close_connection(struct hostapd_data *hapd)
264264
{
265-
int ret;
266-
267265
if (hapd_ctrl_conn == NULL)
268266
return;
269267

270-
ret = wpa_ctrl_detach(hapd_ctrl_conn);
271-
if (ret < 0) {
272-
wpa_printf(MSG_INFO, "Failed to detach from wpa_supplicant: %s",
273-
strerror(errno));
274-
}
275268
wpa_ctrl_close(hapd_ctrl_conn);
276269
hapd_ctrl_conn = NULL;
277270
}

hostapd/hostapd_cli_zephyr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ int hostapd_ctrl_command_interactive(struct wpa_ctrl *ctrl, const char *cmd);
2020
int zephyr_hostapd_cli_cmd_resp(const char *cmd, char *resp);
2121
int zephyr_hostapd_cli_cmd_v(const char *fmt, ...);
2222
int zephyr_hostapd_ctrl_init(void *ctx);
23+
void zephyr_hostapd_ctrl_deinit(void *hapd);
2324
int zephyr_hostapd_ctrl_zephyr_cmd(int argc, const char *argv[]);
2425
#endif /* __HOSTAPD_CLI_ZEPHYR_H_ */

src/drivers/driver_zephyr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ static void wpa_drv_zep_hapd_deinit(void *priv)
13681368

13691369
if_ctx = priv;
13701370

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

0 commit comments

Comments
 (0)