From a2599007202c3c5682aeebb742177ccf8b0b6ee1 Mon Sep 17 00:00:00 2001 From: Maochen Wang Date: Tue, 15 Oct 2024 16:02:20 +0800 Subject: [PATCH] hostap: fix DUT hang when start SAP on wrong channel When try to start SAP on channel 12 with region code US, the channel check will fail and calls supplicant_send_wifi_mgmt_ap_status() with iface->owner is NULL, which causes DUT hang. Set iface->owner when enable the SAP can fix this issue. Signed-off-by: Maochen Wang --- modules/hostap/src/supp_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/hostap/src/supp_api.c b/modules/hostap/src/supp_api.c index a75c7e5afb5..445c5c7cfc8 100644 --- a/modules/hostap/src/supp_api.c +++ b/modules/hostap/src/supp_api.c @@ -1737,6 +1737,8 @@ int supplicant_ap_enable(const struct device *dev, goto out; } + iface->owner = iface; + if (iface->state == HAPD_IFACE_ENABLED) { ret = -EBUSY; wpa_printf(MSG_ERROR, "Interface %s is not in disable state", dev->name);