Skip to content

Commit ff769d4

Browse files
jukkarkartben
authored andcommitted
net: hostap: Set names for the threads
The interface workq thread and supplicant handler thread did not had names set to them. Set the names so that it is easier to find them from "kernel thread stacks" list. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 4744d13 commit ff769d4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

modules/hostap/src/supp_main.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,9 @@ static void handler(void)
11351135
{
11361136
struct supplicant_context *ctx;
11371137
struct wpa_params params;
1138+
struct k_work_queue_config iface_wq_cfg = {
1139+
.name = "hostap_iface_wq",
1140+
};
11381141

11391142
#if !defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE) && !defined(CONFIG_MBEDTLS_ENABLE_HEAP)
11401143
/* Needed for crypto operation as default is no-op and fails */
@@ -1151,7 +1154,7 @@ static void handler(void)
11511154
k_work_queue_start(&ctx->iface_wq, iface_wq_stack,
11521155
K_THREAD_STACK_SIZEOF(iface_wq_stack),
11531156
CONFIG_WIFI_NM_WPA_SUPPLICANT_WQ_PRIO,
1154-
NULL);
1157+
&iface_wq_cfg);
11551158

11561159
k_work_init(&ctx->iface_work, iface_work_handler);
11571160

@@ -1209,11 +1212,15 @@ static void handler(void)
12091212

12101213
static int init(void)
12111214
{
1215+
k_tid_t id;
1216+
12121217
/* We create a thread that handles all supplicant connections */
1213-
k_thread_create(&tid, supplicant_thread_stack,
1214-
K_THREAD_STACK_SIZEOF(supplicant_thread_stack),
1215-
(k_thread_entry_t)handler, NULL, NULL, NULL,
1216-
CONFIG_WIFI_NM_WPA_SUPPLICANT_PRIO, 0, K_NO_WAIT);
1218+
id = k_thread_create(&tid, supplicant_thread_stack,
1219+
K_THREAD_STACK_SIZEOF(supplicant_thread_stack),
1220+
(k_thread_entry_t)handler, NULL, NULL, NULL,
1221+
CONFIG_WIFI_NM_WPA_SUPPLICANT_PRIO, 0, K_NO_WAIT);
1222+
1223+
k_thread_name_set(id, "hostap_handler");
12171224

12181225
return 0;
12191226
}

0 commit comments

Comments
 (0)