Skip to content

Commit b7a9d88

Browse files
MaochenWang1henrikbrixandersen
authored andcommitted
hostap: fix the build error of zephyr_hostapd_cli_cmd_resp
Fix the build error that missing ctrl parameter in zephyr_hostapd_cli_cmd_resp by getting iface->ctrl_conn. Signed-off-by: Maochen Wang <[email protected]>
1 parent 6ba447a commit b7a9d88

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/hostap/src/hapd_api.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ static int hapd_ap_wps_pin(const struct device *dev, struct wifi_wps_config_para
830830
}
831831

832832
if (params->oper == WIFI_WPS_PIN_GET) {
833-
if (zephyr_hostapd_cli_cmd_resp(get_pin_cmd, params->pin)) {
833+
if (zephyr_hostapd_cli_cmd_resp(iface->ctrl_conn, get_pin_cmd, params->pin)) {
834834
goto out;
835835
}
836836
} else if (params->oper == WIFI_WPS_PIN_SET) {
@@ -1013,11 +1013,18 @@ int hostapd_dpp_dispatch(const struct device *dev, struct wifi_dpp_params *param
10131013
{
10141014
int ret;
10151015
char *cmd = NULL;
1016+
struct hostapd_iface *iface;
10161017

10171018
if (params == NULL) {
10181019
return -EINVAL;
10191020
}
10201021

1022+
iface = get_hostapd_handle(dev);
1023+
if (!iface) {
1024+
wpa_printf(MSG_ERROR, "Interface %s not found", dev->name);
1025+
return -ENOENT;
1026+
}
1027+
10211028
cmd = os_zalloc(SUPPLICANT_DPP_CMD_BUF_SIZE);
10221029
if (cmd == NULL) {
10231030
return -ENOMEM;
@@ -1031,7 +1038,7 @@ int hostapd_dpp_dispatch(const struct device *dev, struct wifi_dpp_params *param
10311038
}
10321039

10331040
wpa_printf(MSG_DEBUG, "hostapd_cli %s", cmd);
1034-
if (zephyr_hostapd_cli_cmd_resp(cmd, params->resp)) {
1041+
if (zephyr_hostapd_cli_cmd_resp(iface->ctrl_conn, cmd, params->resp)) {
10351042
os_free(cmd);
10361043
return -ENOEXEC;
10371044
}

0 commit comments

Comments
 (0)